This is Argyn's blog. I comment on topics of my interests such as software, math, finance, and music. Also, I write about local events in Northern Virginia, USA and all things related to Kazakhstan

Thursday, April 21, 2005

Mapping log levels from Log4j and jdk logging to commons logging

I found a mapping of log levels in this article.

A simple example will make things clear. Consider Logging providers again. Log4J comes with levels of logging – DEBUG, INFO, WARN, ERROR and FATAL. JDK 1.4 Logging comes with seven levels – FINEST, FINER, FINE, CONFIG, INFO, WARNING and SEVERE. Commons Logging API acts as the wrapper on both of these logging providers. It provides six levels of logging – TRACE, DEBUG, INFO, WARN, ERROR and FATAL. For Log4J, it maps both the TRACE and DEBUG levels to the Log4J’s DEBUG level. Other levels are mapped to levels with similar names. For JDK 1.4 Logging, it maps TRACE to FINEST, DEBUG to FINE, INFO to INFO, WARN to WARNING, ERROR and FATAL to SEVERE. Consequently FINER and CONFIG levels from JDK 1.4 Logging are left out.

No comments: