| Author |
Diabling logging in log4j
|
S.S Rao
Greenhorn
Joined: Aug 01, 2005
Posts: 2
|
|
I read this in one log4j document on net: "When moving code to production, for speedy performance, you can disable logging wholesale equal to or below a certain priority for all categories in a hierarchy. For example, To log nothing at all ever, specify log.disable=FATAL in the configuration properties file. " But this is not working in my case. Should I use "log.disableOverride". If yes, then how exactly to use this ?
|
 |
Dave Salter
Ranch Hand
Joined: Jul 20, 2005
Posts: 292
|
|
You want to set the logging level something like: If you set it to FATAL, then only vey serious errors will be logged, thats probably a good practice. You can find full details and examples here.
|
 |
Sangeetha Rao
Ranch Hand
Joined: Aug 01, 2005
Posts: 33
|
|
I think I didnt make my question clear. I dont want to know about levels. Infact my log4j.properties file has two appenders, one set to the level of fatal and another to debug. What I want to know is how to diable logging as a whole? I guess this can be done using log4j.diable=fatal.But it is not happening with this statement alone. It has to be preceded or followed by log4j.diableOverride. But I dont know what is the exact way of doing it. Can anybody clarify ?
|
 |
Carol Enderlin
drifter
Ranch Hand
Joined: Oct 10, 2000
Posts: 1340
|
|
My google search on log.disable returned results that make it look like that might have been used in some previous version of log4j. Have you tried this one? log4j.threshold=OFF
|
 |
Sangeetha Rao
Ranch Hand
Joined: Aug 01, 2005
Posts: 33
|
|
|
Thanks Carol .... it worked !!
|
 |
 |
|
|
subject: Diabling logging in log4j
|
|
|