Problem: Mapped Diagnostic Context (MDC) values aren't available in Weblogic 10.3.5 Logs
I am developing a web application that is deployed on
Weblogic 10.3.5 and I am using
SLF4J for logging. I used the Mapped Diagnositc Context (
MDC) feature of SLF4J to include the current user and the current remote IP for each log message.
[2012-03-02 12:56:29,770] INFO ii.green.phillip.ImportantClass - IP[127.0.0.1] - UserName[pdgreen] - Info Message
I use a servlet
filter to set the MDC values and everything worked just fine when I used log4j or logback as the SLF4J implementation. While the logs look fine with a file appender, they don't show up in the Weblogic logs when I use the console appender.