logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Gerrard" <cgerr...@sct.com>
Subject Re: Turning a Category On/Off
Date Sat, 05 Jan 2002 00:25:10 GMT

The
  ejbSuccess.info("********** UPDATE SUCCESS -> OFF");
method will emit the messages as "info" is a "higher" priority than
"debug".

If you set the priority to something higher than "info", e.g. "warn"
the message should be appear.

Try using
  ejbSuccess.setPriority(Priority.WARN);

Good luck.



                                                                                         
                             
                    "T Master"                                                           
                             
                    <tmaster@iknowled        To:     "Log4J Users List" <log4j-user@jakarta.apache.org>
               
                    geinc.com>               cc:                                      
                                
                                             Subject:     Re: Turning a Category On/Off  
                             
                    01/04/2002 06:12                                                     
                             
                    PM                                                                   
                             
                    Please respond to                                                    
                             
                    "Log4J Users                                                         
                             
                    List"                                                                
                             
                                                                                         
                             
                                                                                         
                             


After setting my logger to DEBUG to stop info() messages, I am still
getting
output.
Anyone have ideas why please?

Below are some clear details on code, stdout, and file output.


Code:
        System.out.println("********** UPDATE SUCCESS -> OFF");
        ejbSuccess.setPriority(Priority.DEBUG);
        ejbSuccess.info("********** UPDATE SUCCESS -> OFF");
        System.out.println("********** success is " +
ejbSuccess.getChainedPriority().toString() );

Console Output:
********** UPDATE SUCCESS -> OFF
********** success is DEBUG


My File contains:
********** UPDATE SUCCESS -> OFF



T Master


----- Original Message -----
From: "T Master" <tmaster@iknowledgeinc.com>
To: <log4j-user@jakarta.apache.org>
Sent: Friday, January 04, 2002 3:03 PM
Subject: Turning a Category On/Off


>
> Apologies for dumb questions...
>
> I am trying to dynamiccally modify my Category's Priority at run
time.
>
> The code below is used to effect this:
>             myCategory.setPriority(Priority.INFO);  // Turn ON
>             myCategory.setPriority(Priority.DEBUG);  // Turn OFF
>
>
> However, after turning my Category OFF , messages logged at the info
level
> still appear in my File.
>
> I believe I'm doing somethign really stupid or should not be using
DEBUG
as
> my OFF equivilant.
>
>
> T Master



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






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


Mime
View raw message