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
**❗ Keep track of all subsequent calls and promises originated from a single request (e.g. HTTP).**
555
555
556
556
In a real world application a call to an API would lead to many logs produced across the entire application.
557
-
When debugging it can get quite handy to be able to group all logs based by a unique identifier, e.g. `requestId`.
557
+
When debugging it can be quite handy to be able to group all logs based on a unique identifier, e.g. `requestId`.
558
558
559
-
Some provides (e.g. `Heroku`) already set a `X-Request-ID` header, which we are going to use or fallback to a short ID generated by <ahref="https://www.npmjs.com/package/nanoid"target="_blank">`nanoid`</a>.
559
+
Some providers (e.g. `Heroku`) already set a `X-Request-ID` header, which we are going to use or fallback to a short ID generated by <ahref="https://www.npmjs.com/package/nanoid"target="_blank">`nanoid`</a>.
560
560
561
561
**In this example every subsequent logger is a sub logger of the main logger and thus inherits all of its settings making `requestId` available throughout the entire application without any further ado.**
**❗ Keep track of all subsequent calls and promises originated from a single request (e.g. HTTP).**
555
555
556
556
In a real world application a call to an API would lead to many logs produced across the entire application.
557
-
When debugging it can get quite handy to be able to group all logs based by a unique identifier, e.g. `requestId`.
557
+
When debugging it can be quite handy to be able to group all logs based on a unique identifier, e.g. `requestId`.
558
558
559
-
Some provides (e.g. `Heroku`) already set a `X-Request-ID` header, which we are going to use or fallback to a short ID generated by <ahref="https://www.npmjs.com/package/nanoid"target="_blank">`nanoid`</a>.
559
+
Some providers (e.g. `Heroku`) already set a `X-Request-ID` header, which we are going to use or fallback to a short ID generated by <ahref="https://www.npmjs.com/package/nanoid"target="_blank">`nanoid`</a>.
560
560
561
561
**In this example every subsequent logger is a sub logger of the main logger and thus inherits all of its settings making `requestId` available throughout the entire application without any further ado.**
0 commit comments