You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And when pinoHttp is supplied as the tuple [Options, DestinationStream], the above logic fails, resulting in this.errorKey being incorrectly defaulted to err, despite having a valid customAttributeKeys.err defined in the Options.
What is the expected behavior?
Users should be able to use any valid signature of pinoHttp without losing the ability to specify their errorKey.
Please provide minimal example repo, not code snippet. Without example repo this issue will be closed.
Sorry, I already spent my Saturday tracking down this bug. You can close this issue if you want, but a cursory glance will prove its validity.
Please mention other relevant information such as Node.js version and Operating System.
N/A
The text was updated successfully, but these errors were encountered:
What is the current behavior?
PinoLogger
'serrorKey
is not properly initialized whenpinoHttp
is supplied as a tuple.Inside the
PinoLogger
constructor, theerrorKey
is initialized (or defaulted) as such:However, the
Options
forpinoHttp
could also be supplied as a tuple:And when
pinoHttp
is supplied as the tuple[Options, DestinationStream]
, the above logic fails, resulting inthis.errorKey
being incorrectly defaulted toerr
, despite having a validcustomAttributeKeys.err
defined in theOptions
.What is the expected behavior?
Users should be able to use any valid signature of
pinoHttp
without losing the ability to specify theirerrorKey
.Please provide minimal example repo, not code snippet. Without example repo this issue will be closed.
Sorry, I already spent my Saturday tracking down this bug. You can close this issue if you want, but a cursory glance will prove its validity.
Please mention other relevant information such as Node.js version and Operating System.
N/A
The text was updated successfully, but these errors were encountered: