In my opionion, an ERROR message should NEVER be disabled.  I thought that
was the nature of an ERROR.

Setting priority to error should effectively remove all but the most extreme
(fatal) messages.

-----Original Message-----
From: Jamie Tsao [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 4:43 PM
To: [EMAIL PROTECTED]
Subject: Turning off logging in properties file


Hi,

I was evaluating log4j as a possible logging package, and I had a couple of 
questions:

1)  How do you turn off logging completely in the properties file ?  I know 
you can turn off logging during runtime by calling 
PropertyConfigurator.disableAll() , but how can you do so in the properties 
file so that you can start up the application with logging already turned 
off ?  One solution I can see is to define a custom priority lower than 
DEBUG, say ZEROPRIORITY.  Then I can change the priorities of the categories

in the config file to be ZEROPRIORITY.  Now none of the log method calls 
will be logged since the category is lower than the log method priority.  Is

there another way ?

2)  Although I do see the nice benefits of having a hierarchical category 
name space, is it common (or recommended) that I write a single Logging 
class on top of log4j so that my entire application only uses one Category ?

  Then throughout the code, I would selectively have different priority 
logging statements which I could filter during runtime (w/ disable() method 
calls).

Thanks,

Jamie

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


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

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

Reply via email to