logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smpub2000 <smpub2...@yahoo.com>
Subject Reading log4j properties dynamically from log4j API
Date Tue, 29 Apr 2008 16:41:05 GMT

I have an ear file that has log4j.properties conf file. I want to get all the
log4j loggers (i.e categories) defined in the properties file. How can I get
this through the log4j api?

Example log4j.properties:

src packages:

I want to get the keys "com.foo" and "com.foo.bar".  I want to use these
later as arguments to Logger.getLogger("method") and call
setLevel(targetLevel) on it. If I call LogManager.getCurrentLoggers(), it
only retrieves the Logger instances created by Classes, but not the
"package" level loggers that are defined in the log4j.properties file.


View this message in context: http://www.nabble.com/Reading-log4j-properties-dynamically-from-log4j-API-tp16964256p16964256.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message