Skip to content

Export non-patched console #46

Open
@sambuccid

Description

@sambuccid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions