Ive been looking at removing log4j as a dependency for the user and i have come unstuck.
I'll explain how our logging currently works so everyone understands the problem
All JBM classes use JUL as their logger. When running within the AS this is fine as the AS takes care of redirecting these log calls through the jboss logger which uses log4j by default.
When we run standalone we depend on the Microcontainer and its dependencies. These dependencies use jboss logging which redirects its logging to what ever logging plugin class is set. If this is the null plugin class then the MC (or one of its dependencies) sets a plugin that redirects to system.out which is horrible. Because of this we provide our own plugin class JBMLoggerPlugin which currently uses log4j.
So any logging by the MC currently does this
jboss logging -> JBMLoggerPlugin -> log4j
and any JUL logging (JBM) either does
JUL -> jboss logging -> JBMLoggerPlugin -> log4j
if the jboss JUL handler is set or
JUL -> log4j
if the log4j handler is set.
Hope that makes sens, anyway, this means that our clients and server always have a dependency on log4j.
Changing the JBMLoggerPlugin to log somewhere else would solve this but it can't be JUL as you would end up with
JUL -> jboss logging -> JBMLoggerPlugin -> JUL -> etc etc
maybe we could leave the standalone server as is and provide something else for the client, maybe no handlers and just JUL, wdyt?