-
Notifications
You must be signed in to change notification settings - Fork 898
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
browser: cannot get label string in level when I use pino in middleware.ts #1891
Comments
Thanks for reporting! Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that. |
@mcollina I got like the following log.
|
It's not available in middleware because middlewares run in a non-Node.js environment, so pino uses its browser implementation, that lacks this feature. A PR to add it would be amazing. |
Hello, I just opened up a PR for this! Could you take a look please? 👀 Thank you! |
Hello, I update pino latest version. |
v8.19.0 |
Although my pino version is already 8.19.0 and write like the following, log level is a number yet, like level: 30.
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Thank you for useful library.
Although I want to indicate a label of level in logs(e.g. "level":"info"), I could not get the string (I can get number like level: 30) .
I check your document and write like below and it works in api.
I wonder why it is not available for middleware.
The text was updated successfully, but these errors were encountered: