You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Bi...@Certegy.com on 2003/08/15 17:57:19 UTC

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