logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Changing the priority level at runtime
Date Fri, 08 Mar 2002 22:00:03 GMT

Here is a short comment:

Log4j normally needs to be configured only once. Some new users try to 
configure log4j
in each and every class. This is very inefficient and just plain wrong.

HTH, Ceki

At 23:45 08.03.2002 -0800, you wrote:
>  I have two packages and each package has two classes each. If I set the 
> priority level of each class to FATAL , and in the configuration file if 
> I set the priority level of the first package com.foo.a to FATAL and the 
> priority level of second package com.foo.b to DEBUG.  So now I have set 
> levels for four classes and two packages. My question is if i have to 
> change the priority level for any class or package programmaticly  on the 
> fly without touching the config file can I do that or not. At this time 
> if I dont comment the priority level of the classes the packages work and 
> classes dont and vice versa. Here is my config file.....
>log4j.rootCategory=DEBUG, A1
>log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>when I run the class BB which has the main methid (this class instantiate 
>all other classes) it doesnt print anything on the console. If I comment 
>the classes it works.
>Each class has these lines in the construtor
>      debugger.info("This is b.BA");
>and so on. My question is without commenting any of the lines in Log4j can 
>I make it work and if I have to change the level of any of these classes 
>or packages at runtime without editing the configuration file will that work.
>I appreciate your patience


To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

View raw message