[
https://issues.jboss.org/browse/WFCORE-2995?page=com.atlassian.jira.plugi...
]
David Lloyd commented on WFCORE-2995:
-------------------------------------
bq. The problem is logback is a log manager as is the JBoss Log Manager. To get WildFly to
work with log4j we forked log4j and replaced the log manager parts to delegate to the
JBoss Log Manager. In order to get this to work log4j2 or logback we'd have to do the
same type of thing.
I agree. However it may still be worth doing, or at least researching a bit.
WildFly: support logback.xml in Per-deployment Logging (instead of
silently ignoring logback.xml)
-------------------------------------------------------------------------------------------------
Key: WFCORE-2995
URL:
https://issues.jboss.org/browse/WFCORE-2995
Project: WildFly Core
Issue Type: Feature Request
Components: Logging
Reporter: Geoffrey De Smet
Assignee: James Perkins
Wildfly currently supports the following _Per deployment logging_ configurations [1]:
logging.properties
jboss-logging.properties
log4j.properties
log4j.xml
jboss-log4j.xml
All of these are stale because they are based on Log4j 1.x format which died about 8
years ago (along with using properties files for logging configuration).
Modern popular options include Logback (with SLF4J), JBoss Logging and Log4j 2.x.
*I regularly see WildFly users (included RH employees) that struggle to configure the
logging configuration of their WildFly apps.* Spring Boot does not have this problem. _To
fix this, WildFly should support logback.xml for Per deployment logging too._
When I add a logback.xml in my war's WEB-INF/classes directory and explicitly add the
logback-classic.jar in WEB-INF/lib directory - which works to configure Logback in any
other JVM - then WildFly ignores it (~ it says GFY). My logs doesn't show up and
developing on WildfFly is a pain due to blindness.
Fake solution: Configuring the log files per WildFly installation is not practical for
developers (it is for sys admins): the log configuration should be in my war's sources
on github, so other developers automatically have it without needing to jump to wildfly
installation hoops (which is sometimes not possible, think OpenShift).
Although it's ok that WildFly favors JBoss Logging, it should not dictate it and
support other logging systems such as Logback too for the war files at least (= per
deployment).
[1]
https://docs.jboss.org/author/display/WFLY10/Logging+Configuration
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)