ceki at qos.ch
Sat Apr 21 22:22:53 CEST 2007
Sorry for the late reply.
I believe that logback's internal status reporting is one of its strong points.
Basically, all logback modules (logback-core, logback-classic and
logback-access) revolve around a context, a LoggerContext in case of
logback-classic. All problems encountered during the lifetime of the context are
reported through status messages which are added to a StatusManager. Each
context has its own separate StatusManager.
Thus, whenever you wish to print the internal status of a context, you call
StatusPrinter.print(context). In logback-classic, the exact steps would be
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
For more complete examples see "Chapter 2 - Architecture"  section entitled
"Configuration" and especially the MyAppWithConfigFile class .
I hope this helps,
dirk ooms wrote:
> i would like to watch the 'internal' logging of logback to check whether
> logback is happy with the provided logback.xml (similar to using the
> log4j.debug in log4j), but i am not sure how to do this. i noticed the
> existence of StatusManager, but it's not clear to me how to use it.
> thanks for any guidance on this,
Logback: The reliable, generic, fast and flexible logging framework for Java.
More information about the Logback-user