You might want to check how LogWeb does it.

On Tue, Apr 29, 2008 at 11:41 AM, smpub2000 <[EMAIL PROTECTED]> wrote:
>
> 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:
> log4j.category.com.foo=debug
> log4j.category.com.foo.bar=error
>
> 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.
>
> Thanks,
> SM.
>
> --
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
James A. N. Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to