Generic way to get list of all loggers
Asked Answered
C

0

8

We used Apache commons logging API for logging (debug,error etc methods), and we had used log4j implementation.

we used LogManager.getCurrentLoggers() from log4j to get all the loggers.

Now we deployed our application in jboss wildfly which uses different logging implementation (Jboss logging) so our code is not working since all our loggers now are from Jboss.

Now either i have to find alternate equivalent of LogManager.getCurrentLoggers() in Jboss or exclude logging subsystem in jboss-deployment-structure.xml.

is there any way to get listofloggers through common logging api? so that my code always works irrespective of the logging implementations?

Catherine answered 6/1, 2015 at 13:24 Comment(3)
Does this look similar - developer.jboss.org/thread/233195 ?Physicalism
@Andy yes it does look similar but i am more of looking for a generic solution, for using jboss class i have to include that jar in my compilation dependency where (build env) i do not have jboss specific jars.Catherine
JBoss AS 7 does not use slf4j. It uses the JBoss Log Manager which is an extension of JUL.Magnetics

© 2022 - 2024 — McMap. All rights reserved.