-
Notifications
You must be signed in to change notification settings - Fork 118
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
fix: twice customProps #288
Conversation
@youngkiu I thought this was by design to be fast... when the JSON is parsed, most parsers I have tested will keep the last entry logged, so there shouldn't be any dupes appearing in your log viewer? [however, the raw log output locally before it gets shipped/processed, would show the duplicates, possibly]... I don't see a way of fixing this that isn't a performance regression, and for most folks, I don't think it matters. I would have assumed a pretty printer when running locally would have fixed this? I'm not using cloud functions, but if the logging was JSON native, and you disable pretty printing, and let Google format it for you, it shouldn't have duplicates (if that's an option). I just read all the threads on this, it looks like breaking up the |
@jmealo Thanks for your interest in my fix. I understand that using pino-pretty will output customProps without duplication due to JSON parsing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! Can you please add a unit test?
@youngkiu: If you need a hand with unit tests let me know. I think a failing test for the current implementation would be the easiest way to approach this. |
|
@mcollina |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Hello!
I am the author of pino-web-hook.
I am using the NestJS framework, and I wanted to display the
pinoHttp
property, thinking that the main function ofnestjs-pino
is Middleware that connectspino-http
.However, I found the following bug, and also found out that there is an issue #216.
I tried the following to solve this problem.
I debugged it with the following modified example.js file.
Thanks