-
Notifications
You must be signed in to change notification settings - Fork 116
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
quietResLogger clarifications #350
Comments
You likely know more about that option that me know. I really regret merging that PR at this point :). How would you recommend fixing this? |
I've also been very confused by these flags. Running Express, the default From my understanding of the README.md, it sounds like if you set I'd expect the two flags to work independently of each other, such as:
But from a very basic app with no other configuration or logging modifications, as far as I can see the current behaviour works like this?
So
This doesn't make any sense! |
Let's rip it out and release a new major. |
Big fan of pino and was looking at leveraging pino-http to replace some outdated custom setup in our apps. I was looking at the recently added
quietResLogger
option and was hoping you could clarify its behavior (and perhaps its intended usage based on #235/#339?).According to the README, setting
quietResLogger
totrue
will include the request id underreqId
and "only containreq
" (I assume that last bit is just a typo that is supposed to say "only containres
").However,
reqId
is only included underres.log
ifquietReqLogger
is also set. Is the intended usage to set both options as the unit tests seem to indicate?Reading #235, I assumed the use case was either:
customReceivedMessage
andquietResLogger
res.log
to get quiet logging withreqId
during their business logicquietResLogger
req.log
at the start of a handler followed by only usingres.log
for quiet logging afterward, e.g.:However, I don't think either of the above approaches works if
quietReqLogger
is set since it suppressesreq
from bothcustomReceivedMessage
andreq.log
. Obviously I could log that req info in other ways even in quiet mode, but pino's consistent format is preferred.Thanks and hopefully this made sense. Up way later than I should have been while reading docs and writing this. 😆
The text was updated successfully, but these errors were encountered: