Additional info from MDC to logs (java.util.logging)

480 views Asked by At

Exist any possibility to add MDC to java.util.logging ?

If yes, how to reach it ?

1

There are 1 answers

0
jmehrens On BEST ANSWER

The JDK logging is setup to just include everything you need as a log parameter.

To make the MDC work you have to create filters and or formatters that are aware of the MDC. Then install only those filters and formatters on every handler in the logging system.