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 Samip Ladhawala <sa...@yahoo.com> on 2002/04/04 06:14:05 UTC
log4j.disable
Hi
I found answer to my previous question...
But I tried to use log4j.disable and log4j.enable. None of them are working. My Property file looks like this:
log4j.debug=true
log4j.rootCategory=debug, dest1
log4j.disableOverride=false
log4j.enable=OFF
log4j.appender.dest1=org.apache.log4j.FileAppender
log4j.appender.dest1.File=d:/projects/logexample3/log4.log
log4j.appender.dest1.Append=false
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
log4j.appender.dest1.layout.ConversionPattern=%-5p %l %x: %m%n
I tried to change the position of log4j.enable, but it's not working. I am using this in my test servlet. If anybody has solution, please help me as soon as possible.
Samip.
Samip Ladhawala <sa...@yahoo.com> wrote:
Hi,
Is there any way to enable and disable logging dynamically in servlets. If we use XML configuration file and change additivity for suppose debug to false then it will not disable debug but everything else. Is there anyway we can enable and disable everything and we can change it to enable as and when we want. Did anybody try this? Please Help!!!
Thanks in advance,
Samip.
---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
Re: log4j.disable
Posted by Ceki Gülcü <ce...@qos.ch>.
Hi,
In the Hierarchy class the disable family of methods have been removed and
replaced by setThreshold and getThreshold methods. This change is not
backward compatible.
The new directive is
log4j.threshold=aLevel
Here are some examples:
# turns off all logging
log4j.threshold=OFF
# throw away all DEBUG messages regardless of logger and its settings
log4j.threshold=INFO
# throw away all DEBUG and INFO messages regardless of logger and its settings
log4j.threshold=WARN
# This is the default. In other words, does not filter anything
log4j.threshold=ALL
HTH, Ceki
At 11:16 04.04.2002 -0800, you wrote:
>Hi,
>It seems that log4j.disable and log4j.enable are not working with 1.2beta
>version. When I tried log4j.disable with 1.1.3 version it works fine. Is
>1.2beta backward compatible? Is there replacement of this statement
>(log4j.disable) in 1.2beta, because even log4j.enable was also not working
>with 1.2beta. If anybody faced the same problem and has the solution then
>please help me out!!! I really wanted to use this parameter(disable).
>Thanks,
>Samip.
> Samip Ladhawala <sa...@yahoo.com> wrote:
>Hi
>I found answer to my previous question...
>But I tried to use log4j.disable and log4j.enable. None of them are
>working. My Property file looks like this:
>log4j.debug=true
>log4j.rootCategory=debug, dest1
>log4j.disableOverride=false
>log4j.enable=OFF
>log4j.appender.dest1=org.apache.log4j.FileAppender
>log4j.appender.dest1.File=d:/projects/logexample3/log4.log
>log4j.appender.dest1.Append=false
>log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
>log4j.appender.dest1.layout.ConversionPattern=%-5p %l %x: %m%n
>I tried to change the position of log4j.enable, but it's not working. I am
>using this in my test servlet. If anybody has solution, please help me as
>soon as possible.
>
>Samip.
>Samip Ladhawala wrote:
>Hi,
>
>Is there any way to enable and disable logging dynamically in servlets. If
>we use XML configuration file and change additivity for suppose debug to
>false then it will not disable debug but everything else. Is there anyway
>we can enable and disable everything and we can change it to enable as and
>when we want. Did anybody try this? Please Help!!!
>
>Thanks in advance,
>
>Samip.
--
Ceki
My link of the month:
http://www.suntimes.com/output/otherviews/cst-edt-ref31.html
Re: log4j.disable
Posted by Samip Ladhawala <sa...@yahoo.com>.
Hi,
It seems that log4j.disable and log4j.enable are not working with 1.2beta version. When I tried log4j.disable with 1.1.3 version it works fine. Is 1.2beta backward compatible? Is there replacement of this statement (log4j.disable) in 1.2beta, because even log4j.enable was also not working with 1.2beta. If anybody faced the same problem and has the solution then please help me out!!! I really wanted to use this parameter(disable).
Thanks,
Samip.
Samip Ladhawala <sa...@yahoo.com> wrote:
Hi
I found answer to my previous question...
But I tried to use log4j.disable and log4j.enable. None of them are working. My Property file looks like this:
log4j.debug=true
log4j.rootCategory=debug, dest1
log4j.disableOverride=false
log4j.enable=OFF
log4j.appender.dest1=org.apache.log4j.FileAppender
log4j.appender.dest1.File=d:/projects/logexample3/log4.log
log4j.appender.dest1.Append=false
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
log4j.appender.dest1.layout.ConversionPattern=%-5p %l %x: %m%n
I tried to change the position of log4j.enable, but it's not working. I am using this in my test servlet. If anybody has solution, please help me as soon as possible.
Samip.
Samip Ladhawala wrote:
Hi,
Is there any way to enable and disable logging dynamically in servlets. If we use XML configuration file and change additivity for suppose debug to false then it will not disable debug but everything else. Is there anyway we can enable and disable everything and we can change it to enable as and when we want. Did anybody try this? Please Help!!!
Thanks in advance,
Samip.
---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax