-
Notifications
You must be signed in to change notification settings - Fork 150
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
Regression with levelKey handling in version 10 #456
Comments
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
@mcollina I have created a PR with a fix for this. |
mcollina
pushed a commit
that referenced
this issue
Nov 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When pino-pretty is used together with elastic formatting the logging level has
log.level
key in the log object. I found no way to make pino-pretty work correctly with this level key.In version 9 pino-pretty allowed dot in key names without escaping while in version 10 we need to escape it with slashes.
This would be ok but this escaping breaks excluding this key from the message string.
Example (uncomment levelKey with/without escaping to see different havaviours):
The example output is
As you can see the output contains unwanted
"log.level":"info"
and"log.level":"debug"
.If I remove dot escaping then the output changes to
Ths time it has no colored
INFO
andDEBUG
levels.The text was updated successfully, but these errors were encountered: