Besides that, if you want to disable the debug level, then don't set the debug level in the root logger. Replace...
<priority value ="debug" />
with
<level value="error" />
At least something to that effect (BTW, don't use <priority>, use <level>).
Jake
At 12:45 PM 9/14/2004 +0530, you wrote:
Hi, Thanks for your mail. My logger is working fine. There is no problem with logging messages. Actually, I want do disable the logger. For this what I need to change in config file, I am not getting that. Please help me on this. This is code of my logging.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" Debugge ="false">
<appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value= "[%d][%p][%C-%M(%L)]: %m\r\n" /> </layout> </appender>
<appender name="errorWriterAppender" class="org.apache.log4j.WriterAppender"> <param name="File" value="C:/log/error.html"/> <param name="append" value="true"/> <!-- <param name="DatePattern" value="'.'MM_dd_yyyy" /> --> <layout class="org.apache.log4j.HTMLLayout"> <!-- <param name="ConversionPattern" value= "[%d][%p][%t][%C-%M(%L)]: %m\r\n" /> --> </layout> </appender>
<root> <priority value ="debug" /> <appender-ref ref="errorWriterAppender"/> </root> </log4j:configuration> In my code I am checking for "isDebugEnabled()", before writting.
Thanks & Regards Anup Kumar Associate Consultant. Kanbay Software Pvt. Ltd, A-1, Technology Park, MIDC, Talwade, Pune - 412 114. Tel : 2760 1000 Extn : 4139| Cell : +919850571890 Fax: 020-7601002/03 Email: [EMAIL PROTECTED]
-----Original Message----- From: Jim Moore [mailto:[EMAIL PROTECTED] Sent: Saturday, September 11, 2004 8:57 PM To: Log4J Users List Subject: Re: How to disable Debugge
The default logging level is INFO unless you override it. If you want to turn on debugging you have to set up the configuration to do so.
On Sat, 11 Sep 2004 14:54:32 +0530, Anup Kumar <[EMAIL PROTECTED]> wrote: > I am using log4j for logging. I have declared all the required > parameter on logging.xml file. How I will make debugge as false.
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
