-
1. Re: how to configure standalone.xml for log4j2
nadirx Jan 7, 2016 4:23 AM (in response to amrit.khuntia9)Server uses the logging subsystem we "inherit" from WildFly, and it uses the JBoss LogManager. See [WFCORE-482] Add log4j2 support for WildFly - JBoss Issue Tracker for discussion related to log4j 2.x in that context. Maybe jamezp can provide more information.
-
2. Re: how to configure standalone.xml for log4j2
jamezp Jan 8, 2016 6:04 PM (in response to nadirx)There is a facade from log4j (1.x) to JBoss Log Manager. There is not a facade to delegate log4j2 to the JBoss Log Manager at this time. From a WildFly perspective you can include a log4j2 configuration file in your deployment and include the log4j2 library and all should work. You just don't have central runtime configuration tools.
--
James R. Perkins
-
3. Re: how to configure standalone.xml for log4j2
jviebig Mar 15, 2017 6:30 AM (in response to jamezp)Just a note for people that just want their application using log4j2 to log to the wildfly server log (for example because of using a framework struts2 which is using log4j2)
The answer is here:
Just include:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.7</version>
</dependency>