Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

is it possible to use winston logger with payload?

default discord avatar
artmelkon8 months ago
2

I would like to have some type of error logger, most preferably winston logger



Thank you.

  • default discord avatar
    notchrlast year
    @839277522956845158

    Good morning! Hmm, this is a good question - I know you can hook into express via

    server.ts

    which I believe includes Payloads logging - perhaps you could create a basic winston middleware that acts similarly. If I find some more information on this today I'll post a link!



    @114557048678514693

    Can you share the errors you encountered?



    Hmm, when you get a chance, feel free to share and I can do my best to advise

  • default discord avatar
    tyteen4a03last year

    Bump - I tried integrating Winston and got a lot of errors surrounding nodejs polyfills



    I don't have them right now but they're related to webpack 5 and importing nodejs modules



    I don't have the code anymore as I gave up on winston



    but try adding winston as a dep and call it from server side code



    still trying to find a way to ingest my logs into Logstash though

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.