-
i'm trying to migrate to log4j 2. I configured it and now i have a simple log system working in the console. Here my log4j2.properties file:
And here the output i see in the console:
i mean this part of the output message:
Is it normal? is there a way to prevent this behavior? Thanks in advanced |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
What environment are you running in? Several application servers call |
Beta Was this translation helpful? Give feedback.
The reason you don't see it with log4j1 is JBoss EAP/WildFly use a forked version of log4j where the
ConsoleAppender
is updated to write directly toSystem.out
. We do not fork log4j-core because WildFly itself does not ship with log4j-core, but its own implementation of the log4j-api which delegates to thejboss-logmanager
.Looking at the log4j2
ConsoleAppender
, I do think usingdirect="true"
would likely work. It's using theFileDescriptor
which is effectively what the forked log4j1ConsoleAppender
is doing.Note that with WildFly 27+ log4j1 is no longer included in WildFly.