Hello Ceki,
Do you mean that I specify specific appenders
and layouts in my main config file for for
the category "MY_APP" and then that I use
Category.getInstance("MY_APP")?
How does this work if I would like to have
different configuration files, one for the
main logging facility and others for specific
services logging? can I do that with the
category hierarchy directly, or do I have
to instantiate a new hierarchy as I initially
thought?
Thanks,
-Fabien
---------------------------------------------
Fabien Modoux,
Voicemate - http://www.voicemate.com
-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 2:11 PM
To: LOG4J Users Mailing List
Subject: Re: Several log hierarchies
Why don't use the category hierarchy? Ceki
At 12:30 20.06.2001 -0400, you wrote:
>Hello,
>
>I currently use PropertyConfigurator.configure(filename)
>to initialize the generic logging framework that is used
>throughout my applications. I would like to have a
>separate logging configuration for a particular part of
>my system (log to a different kind of appender, with a
>different layout). I am thinking of creating a new hierarchy
>for that. I looked at the SocketServer code and am planning
>to do the following:
>
> Hierarchy h = new Hierarchy(new RootCategory(Priority.DEBUG));
> File configFile = new File(configFilename);
> if (configFile.exists()) {
> new PropertyConfigurator().doConfigure(configFile.getAbsolutePath(), h);
> return h.getInstance("MY_APP LOG");
> }
> else {
> // return default logging hierarchy
> }
>
>Is that the proper way to accomplish this?
>
>Thanks for your help,
>
>-Fabien Modoux
>
>---------------------------------------------
>Fabien Modoux,
>Voicemate - http://www.voicemate.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
Ceki Gülcü
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]