You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Shapira, Yoav" <Yo...@mpi.com> on 2003/02/11 14:55:04 UTC

RE: Usage of PropertyConfigurator & Logger Classes

Hi,
You can have separate settings for each logger in your properties file,
and then call PropertyConfigurator once for that file.

The typical usage is one configuration file (be it XML or text
properties)  for the log4j system, configured once (using either a
PropertyConfigurator or a DOMConfigurator).  This file will define
appenders and the root logger level.  In addition, some specific loggers
might be defined in that file, but only few.  Certainly not every single
Logger instance.

The better question is, what are you trying to do? ;)

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: ashokd [mailto:ashokd@visualsoft-tech.com]
>Sent: Saturday, February 02, 2002 2:17 AM
>To: Log4J Users List
>Subject: Usage of PropertyConfigurator & Logger Classes
>
>Hi,
>
>My basic doubt what is the relations ship between PropertyConfigurator
and
>Logger classes.
>
>Can I configure ProperConfigurator for each Logger object?
>
>
>
>Thanks & Regards,
>Ashok.D
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org


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


Re: Usage of PropertyConfigurator & Logger Classes

Posted by ashokd <as...@visualsoft-tech.com>.
Hi Shapira,

Thanks for your reply.

My need is to have a different log files for logging and errors.
In log4j shall we configure two properties files at a time or we need
configure every time by using PropertyConfigurator for 2 property files.

In one properties file shall i configure multiple loggers? If yes any
reference document on this avialable?

If we are using single property file then we can configure at a time.

Suppose if we use only one propertis file, I extended the
ActionServlet(Control Servlet in Struts FrameWork), shall I put
PropertyConfigurator.configure() in init() method.

Thanks & Regards,
Ashok.D

----- Original Message -----
From: "Shapira, Yoav" <Yo...@mpi.com>
To: "Log4J Users List" <lo...@jakarta.apache.org>
Sent: Tuesday, February 11, 2003 7:25 PM
Subject: RE: Usage of PropertyConfigurator & Logger Classes


> Hi,
> You can have separate settings for each logger in your properties file,
> and then call PropertyConfigurator once for that file.
>
> The typical usage is one configuration file (be it XML or text
> properties)  for the log4j system, configured once (using either a
> PropertyConfigurator or a DOMConfigurator).  This file will define
> appenders and the root logger level.  In addition, some specific loggers
> might be defined in that file, but only few.  Certainly not every single
> Logger instance.
>
> The better question is, what are you trying to do? ;)
>
> Yoav Shapira
> Millennium ChemInformatics
>
>
> >-----Original Message-----
> >From: ashokd [mailto:ashokd@visualsoft-tech.com]
> >Sent: Saturday, February 02, 2002 2:17 AM
> >To: Log4J Users List
> >Subject: Usage of PropertyConfigurator & Logger Classes
> >
> >Hi,
> >
> >My basic doubt what is the relations ship between PropertyConfigurator
> and
> >Logger classes.
> >
> >Can I configure ProperConfigurator for each Logger object?
> >
> >
> >
> >Thanks & Regards,
> >Ashok.D
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>


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