-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export non-patched console #46
Comments
What would be the most ergonomic way for you to consume this? Extra methods, or an exported |
I think an exported originalConsole might feel easier to use, but I'm not
sure if it will cause any issues importing that from the next-logger config
file?
If that would be a problem then any other way of accessing the original
console would be great anyway
…On Fri, 12 Jul 2024, 08:38 Chris Atkin, ***@***.***> wrote:
What would be the most ergonomic way for you to consume this? Extra
methods, or an exported originalConsole/unpatchedConsole?
—
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGMNAYW7IKRPZFL5S6Z5BZDZL6BZFAVCNFSM6AAAAABKVGJEIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVGAYDMMBTGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I've run into this problem, too. Easiest workaround seems to be just using Not sure how exposing an Another approach would be an option to pass through lines which seem to already be JSON, either determined by some ugly heuristic like |
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.
The text was updated successfully, but these errors were encountered: