logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie" <post2me...@hotmail.com>
Subject Re: separate log files ??
Date Mon, 03 Sep 2001 21:56:27 GMT
Paul,

Thanks Paul, but you are going a bit too fast for me.
Could you please use some more words, as don't completely understand what
you mean (do you have a tiny example).

Eddie

----- Original Message -----
From: "Paul Glezen" <pglezen@atdial.net>
To: "LOG4J Users Mailing List" <log4j-user@jakarta.apache.org>
Sent: Monday, September 03, 2001 9:24 PM
Subject: Re: separate log files ??


> Eddie Post wrote:
> >
> > However, when application A logs in log file log_file_A and it connects
to
> > applicatoin B, it continues logging in log_file_B. This comes because
> > application B initializes log4j with
PropertyConfigurator.configure(config
> > file) and appearantly it overrides the log4j properties of application
A.
> >
>
> Eddie,
>
> Sounds like a judicious use of categories could solve this.  If the set
> of classes that make up application A and B are disjoint, then it is
> trivial: use classname as category name and it doesn't matter what order
> things are configured.  Set log_file_A for the app_A categories and
> log_file_B for the app_B categories.
>
> If you have utility classes used in both app_A and app_B, then you need
> for the utility class to come up with a scheme (perhaps by using some
> kind of context information) to uniquely name the category instance that
> each utility class instance uses.
>
> If you're calling static methods of utility classes, then you may be out
> of luck.
>
> - Paul
> --
> Beware of bugs in the above code.  I have
> only proved it correct, not tried it.
> -Don Knuth
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message