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
Then Pino will infer the request ID from the req.id we defined.
The same thing can be achieved with the genReqId option, however this also overrides the fallback for when x-request-id/req.id is not defined, which is not always desired. (For context, we want to use x-request-id when it's defined, otherwise use Pino's own request IDs.)
The text was updated successfully, but these errors were encountered:
This module reads from
req.id
:pino-http/logger.js
Line 98 in ef7b7e4
However this property doesn't seem to be documented anywhere. It's not something provided by Express, for example.
Could we add some docs to specify what this is for and how to use it along with this module? I suspect it can be used like this:
Then Pino will infer the request ID from the
req.id
we defined.The same thing can be achieved with the
genReqId
option, however this also overrides the fallback for whenx-request-id
/req.id
is not defined, which is not always desired. (For context, we want to usex-request-id
when it's defined, otherwise use Pino's own request IDs.)The text was updated successfully, but these errors were encountered: