[slf4j-user] Query regarding support for MDC JUL logging within SLF4J

Abdul Hussain abdul.hussain at matillion.com
Tue Apr 14 18:17:16 CEST 2020


For some time now I've used the default java logging library
java.util.logging for logging tomcat 8 with many thousands of logger
messages through SLF4J. Now with the need to append to each log message
thread specific information, MDC seems ideal, unfortunately it seems to be
unsupported for JUL.

>From looking through the code specifically *BasicMDCAdapter* and
*Log4jMDCAdapter*, am I right in assuming that for JUL, at most, I can
retrieve MDC values but would then need to output them separately from the
logger message. unlike log4j where the template can simply be changed to
append MDC values to all log messages?

Does SLF4J provide any support to globally amend log messages given the
limitations of the logging framework?

I'm open to suggestions for alternatives.

Regards,
Abdul Haseeb Hussain

-- 


*The information in this email is confidential and solely for the use of 
the intended recipient(s). If you receive this email in error, please 
notify the sender and delete the email from your system immediately. In 
such circumstances, you must not make any use of the email or its contents. 
Views expressed by an individual in this email do not necessarily reflect 
the views of Matillion Ltd.

*

*Matillion Ltd accepts no responsibility 
for any damage caused by malicious software transmitted by email. Email 
transmission cannot be guaranteed to be secure and error free, it is 
possible for it to be intercepted, lost, destroyed, later, incomplete or 
with added malware. The sender does not accept liability for any errors or 
omissions in the contents of this message, which arise as a result of email 
transmission

*

*Matillion Ltd, Station House, Stamford New Road, 
Altrincham, England, WA14 1EP (Main and registered office address). 
*_Company number: 07474948._
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20200414/2cbedc83/attachment.html>


More information about the slf4j-user mailing list