Next.js Discord

Discord Forum

How to save request logs to a file?

Unanswered
Cape lion posted this in #help-forum
Open in Discord
Avatar
Cape lionOP
I see in the console

GET /page1 200 in 14696ms
POST /page1 200 in 561ms
GET /page2 200 in 450ms


Is there a way to save this in a file? Ideally I'd want to save in JSON to be able to group, do AVG on load times etc, but it could be in plain text as well

In between these logs I have many other logs for other things, so that's not the only output of the application.

0 Replies