logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asad Aziz" <a...@softlead.com>
Subject Changing the priority level at runtime
Date Sat, 09 Mar 2002 07:45:57 GMT

 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message