sheriel [
https://community.jboss.org/people/sheriel] created the discussion
"MDC custom parameter not logged in jboss 7.1.1"
To view the discussion, visit:
https://community.jboss.org/message/830108#830108
--------------------------------------------------------------
Hi,
*Premise:*
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(BlBean.class);
where getInstance returns a org.apache.commons.logging.Log, instantiated with
LogFactory.getLog(clazz);
where LogFactory is org.apache.commons.logging.LogFactory.
*Question:*
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.
Marco
*Details:*
My jboss-deployment-structure is:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<ear-subdeployments-isolated>true</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="com.uniscire.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"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/830108#830108]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]