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]

Reply via email to