Amarnath,
If you call shutdown, then you cannot invoke a printing method (e.g fatal()) of a
category without previously reconfiguring log4j. Ceki
At 18:58 21.04.1999 +0530, you wrote:
>thanks for ur reply Ceki,
>
>in a situatuin in the exectuion i need to close all the log outputs.. howw
>to acheive this...
>i'm expecting this is to do .
>
>Thanks,
>Amarnath
>_____________________________________ Amarnath P " try agian and again till
>you get SUCCEEDED"
>----- Original Message -----
>From: "Ceki Gülcü" <[EMAIL PROTECTED]>
>To: "LOG4J Developers Mailing List" <[EMAIL PROTECTED]>
>Sent: Saturday, April 21, 2001 6:19 PM
>Subject: Re: Error while shutdown a category
>
>
>Amarnath,
>
>Why are you calling cat.shutdown() before cat.fatal()? See the documentation
>on the meaning of Category.shutdown(). Ceki
>
>At 16:49 21.04.1999 +0530, you wrote:
>>hi,
>>
>>when i try to execute the following code, i'm getting the error like this.
>I think basically all the log statements should get down, The Error is :
>>
>>D:\>java CategoryTest
>>frome DEBUG
>>from INFO
>>from WARN
>>log4j:ERROR No appenders could be found for category (CategoryTest).
>>log4j:ERROR Please initialize the log4j system properly.
>>
>> And thanks in advance for ur replys re this.
>>Cheers,
>>Amar
>>
>>Source Code :
>>public class CategoryTest
>>{
>> public static void main(String args[])
>> {
>> org.apache.log4j.Category cat =
>org.apache.log4j.Category.getInstance(CategoryTest.class.getName());
>> cat.setPriority(org.apache.log4j.Priority.DEBUG);
>>
>> //org.apache.log4j.BasicConfigurator.configure();
>> cat.addAppender(new org.apache.log4j.FileAppender(new
>org.apache.log4j.PatternLayout(),System.out));
>>
>> cat.debug("from DEBUG");
>> cat.info("from INFO");
>> cat.warn("from WARN");
>> cat.shutdown();
>> cat.fatal("from FATAL");
>> }
>>}
>>_____________________________________
>>Amarnath P
>>" try agian and again till you get SUCCEEDED"
>
>--
>Ceki Gülcü
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
Ceki Gülcü
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]