[
https://issues.jboss.org/browse/LOGMGR-162?page=com.atlassian.jira.plugin...
]
James Perkins commented on LOGMGR-162:
--------------------------------------
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.
However there is a chance we could attempt to check if a logback-*.jar is present in the
deployment along with a logback and disable WildFly logging for that deployment. You'd
also have to ensure you include any logging facades being used too, e.g. slf4j,
jboss-logging, etc.
The simplest solution for now is to exclude the logging subsystem in a
{{jboss-deployment-structure.xml}}. That would stop WildFly adding any explicit logging
dependencies to your deployment.
WildFly: support logback.xml in Per-deployment Logging (instead of
silently ignoring logback.xml)
-------------------------------------------------------------------------------------------------
Key: LOGMGR-162
URL:
https://issues.jboss.org/browse/LOGMGR-162
Project: JBoss Log Manager
Issue Type: Feature Request
Components: core
Reporter: Geoffrey De Smet
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)