Next.js Discord

Discord Forum

I want to save my logs using pino to my pc(linux) /var/logs/nextjs. How to do that

Unanswered
Rough harvester ant posted this in #help-forum
Open in Discord
Rough harvester antOP
Would love if someone could point me in the right direction. I googled, but didnt find anything

5 Replies

European sprat
Try looking up how to do it with nodejs because it's basically the same
nodejs + pino + transport + destination
something like that
or for a very basic example, maybe this: https://chat.openai.com/share/320ed3ed-e386-41aa-9078-d76d944a4ec1 (I haven't tested it)
and i think there's built in ways with pino transports to save to file system