12 Replies Latest reply on Dec 7, 2011 2:17 PM by markknowles

    JBoss 6 logging and MDC

    chris.jansen

      Hello all,

       

      I am having problems getting the new JBoss logging service to output MDC values in a log file.

       

      I thought that it may be an issue with the standard file appender, so I followed the steps in the issue https://issues.jboss.org/browse/JBAS-8791 to enable the use of log4j appenders. This didn't solve the problem.

       

      I believe the issue may be with the default JBoss 6 pattern layout, but as jboss-logging no longer allows you to specify the pattern layout class that the appender uses I cannot test this theory.

       

      My formatter pattern is:

      %d %-5p [%c] (%t) [%X{user} %X{task}] - %s%E%n"

       

      Has anyone else found this problem and know of a fix or can anyone offer any advice on the subject?

       

      Many thanks,

       

       

      Chris