next-logger
next-logger copied to clipboard
Export non-patched console
First of all thank you for this great library, I wouldn't be able to use Next without it.
I was wondering if it would be possible to export an unpatched version of the console when we patch it.
It would be very useful for specific edge cases where we need to output something to the console without wanting to format it.
My specific use case is with nextjs middleware. The middleware forces the use of the "browser" version of pino, and this redirects all logs to the console.
This creates nested logs where the string logged is inside a log that is then sent by pino to the console and re-wrapped by next-logger.
With access to the original unpatched version of the console it would be possible to change this so that after the logs is processed by pino in my application they are sent directly to the console without passing through next-logger.