Replies: 6 comments 2 replies
-
IMO this is something that deserves a better explanation in the docs, in that I don't think Next exactly supports this out of the box.
We have been pulling individual keys off the request object and |
Beta Was this translation helpful? Give feedback.
-
You can patch the Next.js server to have full access to the request and response objects, and log them with pino-http for example: https://www.tomups.com/posts/log-nextjs-request-response-as-json/ |
Beta Was this translation helpful? Give feedback.
-
this has to be a joke right, nextjs can't NOT have logging??? I'm coming from elixir and i feel like i'm losing my mind. |
Beta Was this translation helpful? Give feedback.
-
Same question here We are developing a 3rd party integration. So it's fundamental to have full log of method, url with query parameters, headers and body. |
Beta Was this translation helpful? Give feedback.
-
Simply unbelievable. Honest question - is OpenTelemetry supposed to be the answer? |
Beta Was this translation helpful? Give feedback.
-
I decided to take a stab at it pull request here #74438, logging is optional and initiated with |
Beta Was this translation helpful? Give feedback.
-
I wonder if when starting a service in production (with
next start
, not with a custom server) there is any way to have in stdout a log of all http requests the server is handling. Even if those requests are serving pre-built static pages and/or SSR pages.I'm talking about logging the usual:
info: 127.0.0.1 - - [10/Mar/2021:14:02:25 +0000] "GET /something HTTP/1.1" 404 150 "-" "curl/7.64.1"
thanks!
Beta Was this translation helpful? Give feedback.
All reactions