[logback-user] Fwd: ContextSelector JNDI (in WildFly)
janarioliver at gmail.com
Wed Apr 29 02:21:09 CEST 2015
No updates here right?
Let me share what I've done.
Full replacement, I intended to remove all default log from wildfly and use
only Logback. Also I wanted to have log separation as in
So to integrate better I've created a subsystem
To use it I have to:
- create a logback-default.xml that will be used by default context
- from standalone.xml remove <extension module="org.jboss.as.logging"/> and
all <subsystem xmlns="urn:jboss:domain:logging:2.0"> body
More details of installation can be found here
After integrate basically I've had 3 problems. Most of them is because some
static Logger instances are loaded from startup and attached with default
- Level by context
After create Logger from default LoggerContext it still with same level. To
make this more dynamic I've created a TurboFilter that wrap all other
So from current LoggerContext if level is denied just deny, if level is
accepted and other filters are neutral just accept, otherwise the result of
With that I've made "contextual" level
- Appender by context
As in Level by context I've wrapped AppenderAttachableImpl and made decision
based on current LoggerContext. But I've supported only root Logger. It
would be difficult to replace all levels
- Error on EJB async
On async calls it throws a NullPointerException because of null from
That one I have no way to make it work without change Logback.
So, I know, work with wrapped instances is not the best way to work. I was
just looking for some points to share here and discuss a better integration
Is this already planned by logback team?
Is there other ways to integrate contextual loggers with logback?
View this message in context: http://logback.10977.n7.nabble.com/Fwd-ContextSelector-JNDI-in-WildFly-tp14188p14205.html
Sent from the Users mailing list archive at Nabble.com.
More information about the Logback-user