4 Replies Latest reply on Aug 6, 2013 12:30 PM by sheriel

    MDC custom parameter not logged in jboss 7.1.1

    sheriel Newbie




      I use this Fromatter string in log configuration for my application: %d{HH:mm:ss,SSS} %-5p %X{transactionId} [%c] (%t) %s%E%n


      I set the transactionId parameter on each invocation with: MDC.put("transactionId", transactionId);

      Trying to log the parameter for debug purpose (with MDC.get("transactionId");) I see the parameter is correctely set.

      In any class I instantiate the logger with: private static final LogManager    LOGGER    = LogManager.getInstance(myClass.class);

      where getInstance returns a org.apache.commons.logging.Log, instantiated with LogFactory.getLog(clazz);

      where LogFactory is org.apache.commons.logging.LogFactory.



      If I deploy my .ear under jboss eap 6.1 the transactionId is correctely logged.

      If I deploy the same .ear under jboss-as-7.1.1, with the same configurations, the transactionId is not logged.

      Have you same suggestion about what I can check?


      Thank you all very much.




      My jboss-deployment-structure is:

      <?xml version="1.0" encoding="UTF-8"?>





                  <module name="com.myapp.be.config" export="true"/>

                  <module name="org.apache.commons.configuration" export="true"/>

                  <module name="org.apache.commons.lang" export="true"/>

                  <module name="org.jboss.resteasy.resteasy-jaxb-provider" export="true"/>

                  <module name="myApp.utils" slot="1.0" export="true"/>