Howdy,
Logger rootLogger = Logger.getRootLogger();
AppenderSkeleton a1 = (AppendeSkeleton) rootLogget.getAppender("A1");
a1.setThreshold(Level.INFO);

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Friday, August 15, 2003 11:57 AM
>To: Log4J Users List
>Subject: How to change Threshhold level of run appender in program
>
>
>Hi All:
>
>I hope you can help me with this:
>
>I have 3 appenders running
>      A1 - writes log entries to the console
>      A2 - write DEBUG and INFO log entries to a file
>      A3 - write WARN and above entries to a file
>
>
>As I develop the program I want to change the threshhold level of A1.
When
>I am working on a section of code I want to set A1 to send DEBUG
entries to
>the console while that code is executing.  Something like
>
>A1.setThreshhold(DEBUG);
>.
>.
>code under development
>.
>.
>A1.setThreshhold(INFO);
>
>The closest thing I have come up with is
>
>- clear existing filters from A1
>- add a LevelMatchFilter for DEBUG
>
>and
>
>- clear existing filters from A1
>- add a LevelMatchFilter for INFO
>
>Does anyone have an other ideas how to do this?
>
>Thanks
>Bill
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to