logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: How to change Threshhold level of run appender in program
Date Fri, 15 Aug 2003 16:00:15 GMT

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

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Bill.Blalock@Certegy.com [mailto:Bill.Blalock@Certegy.com]
>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: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org




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: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message