-
Feature Request
-
Resolution: Done
-
Minor
-
JBossAS-4.0.3RC2
-
None
An extension of the JBoss Logger that adds a log() primitive that maps to a dynamically defined log level.
Example usage:
private static final DynamicLogger log = DynamicLogger.getDynamicLogger(clazz);
...
log.setLogLevel(LOG_LEVEL_INFO);
or
log.setLogLevelAsString("INFO");
...
log.debug(..) // as usual
if (log.isTraceEnabled())
log.trace(..) // as usual
...
log.log("A message"); // logged at INFO
...
log.setLogLevel(LOG_LEVEL_DEBUG);
...
log.log("Another message"); // logged as DEBUG