Guice Jersey slf4j - request id logging

Viewed 2205

In all of my requests, there is a header (request id) that I want to log, in case of anything - on any log level.

Is there a way to inject this into the sl4fj logging? So that the logger always tried to log the request id, in for example logging an exception, but the request.

Or do I always need to add this as a parameter to the logging?

1 Answers
Related