Hello,
I'm exploring Log4j's UGLI interface as a logging-pkg abstraction option.
Is there a way to (programmatically) set the logging level of a ULogger?
Or is this only controllable via the config file?
For instance, I'd like to do something like this:
ULogger logger = LoggerFactory.getLogger(this.getClass());
logger.setLevel(Level.DEBUG); // won't work..
logger.debug("A debug msg");
The LoggerFactory returns a class that implements the ULogger
interface, but the setLevel method is not part of the interface.
Casting logger to a specific concrete class seems to defeat the
purpose of UGLI. And "Level.DEBUG" comes from the log4j pkg, not the
UGLI pkg.
I do indeed want the ability to adjust the logger's (initial)
loglevel, and if this isn't possible, then I should probably just
write against log4j instead of UGLI.
Thanks
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]