[logback-user] Obtaining logger list
ceki at qos.ch
Thu Oct 13 12:01:13 CEST 2011
Assuming logback is the current slf4j binding:
LoggerContext context =
The LoggerContext class has a method called getLoggerList() which
returns the data you are asking for.
Does this answer your question?
On 13/10/2011 11:49 AM, Stevo Slavić wrote:
> Hello Logback users,
> I'm trying to migrate from log4j, more specifically to find a
> replacement for org.apache.log4j.LogManager.getCurrentLoggers
> Is there any other way to obtain Logger list except through JMX and
> JMXConfigurator? Accessing LoggerContext would be enough too - how
> does one grab a hold of that one? I see ContextAware interface and
> Base implementation, maybe if my custom class would implement/extend
> these I could get LoggerContext, but how do I register my components
> with Logback to have the LoggerContext injected?
More information about the Logback-user