1
votes

When using Spring Cloud Sleuth outside of Jboss EAP, everything works fine and we see our traced logs like this:

2018-03-19 16:34:35.947 INFO [identity,3eb8ebf7ca4b15f5,3eb8ebf7ca4b15f5,false] 25456 --- [nio-8081-exec-2] internal.process : message

but when running inside EAP, here is the same output:

2018-03-19 16:34:35.947 INFO [identity,,,] 25456 --- [nio-8081-exec-2] internal.process : message

It's probably linked to slf4j's MDC not read by EAP's internal logger, but I don't have any idea of how to fix this

Also, I noticed that all my deployments have the same application name (identity) in this case when they all have sleuth configured. They all take the name of the first deployed service.

Thank you in advance !

1
Are you packaging your own version of log4j? The log4j binder in JBoss EAP should handle MDC. - James R. Perkins

1 Answers

0
votes

Ok, after some more digging, the solution is quite simple: I just needed to add

 <exclusions>
        <module name="org.apache.log4j"/>
        <module name="org.apache.commons.logging"/>
        <module name="org.slf4j"/>
        <module name="org.slf4j.impl"/>
    </exclusions>

to my jboss-deployment-structure and changing the log formatter of EAP to only print the text without other fields !