-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
None
-
None
I have an EAR application running in a wildfly. In the standalone.xml I have added
<add-logging-api-dependencies value="false"/>
<use-deployment-logging-config value="false"/>
By doing so I want to manage the logging for my application on my own. Next to this I started the server with
-Dorg.jboss.logging.provider="log4j2"
The application is a simple Maven multi module application (EJB, WAR, EAR) and I uploaded a test app for you: logging-ear-sample.zip
When starting the server the logging of the server looks good:
{{{}14:25:51,295 INFO [org.jboss.modules] (main) JBoss Modules version 1.11.0.Final
14:25:51,600 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.12.Final
14:25:51,604 INFO [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
{}}}...
But the logging of the application contains some lines in that params have not been replaced correctly (see %s):
{{14:25:54,456 INFO TESTLFJ2 [org.wildfly.extension.undertow] WFLYUT0021: Registered web context: %s for server %s
14:25:54,477 INFO TESTLFJ2 [org.jboss.as.server] WFLYSRV0010: Deployed "%s" (runtime-name : "%s")}}
It looks like this only happens for log records that are created by JBossLogManagerLogger. When I create a JBOSS logger instance on my own and use
org.jboss.logging.Logger LOG_JBOSS = org.jboss.logging.Logger.getLogger("JBOSS");
LOG_JBOSS.errorf("JBOSS %s", "Check");
everything works fine.
How can I configure Wildfly / my app to correctly replace the "%s" placeholders for a PRINTF log record?