Is log4j2.xml supported in WindFly-22 ?

886 views
Skip to first unread message

Sanjoy Mondol

unread,
Mar 10, 2022, 3:39:18 PM3/10/22
to WildFly
Hi All,
Is log4j2.xml supported in WindFly-22 ?

Thanks in advance.
Sanjoy

This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

James Perkins

unread,
Mar 10, 2022, 7:15:51 PM3/10/22
to WildFly
WildFly itself does not support it. However, you're free to use log4j2 in your deployment. You could see odd results if you use things like a ConsoleAppender though.

Sanjoy Mondol

unread,
Mar 11, 2022, 5:34:03 AM3/11/22
to WildFly
Hi All,
I followed the docs to configure my own version of log4j2, but I am getting the below error. Can someone please help me to resolve this?

ERROR [org.jboss.logmanager.log4j.status] (Server Initialization) LogManager returned an instance of org.jboss.logmanager.log4j.JBossLoggerContextFactory which does not implement org.apache.logging.log4j.core.impl.Log4jContextFactory. Unable to initialize Log4j.

Thanks in advance
Sanjoy

James Perkins

unread,
Mar 14, 2022, 11:28:41 AM3/14/22
to WildFly
You likely need exclude the org.apache.logging.log4j module and org.jboss.logmanager.log4j2 from your deployment. See https://docs.wildfly.org/22/Admin_Guide.html#how-do-i-log4j2.
Reply all
Reply to author
Forward
0 new messages