logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DeSantis, MJ Mark @ IS" <Mark.J.DeSan...@L-3com.com>
Subject RE: log4j:WARN No appenders could be found for logger
Date Wed, 15 Feb 2006 14:04:59 GMT
I think you may have to call the activateOptions method on the
consoleAppender before you are able to use it. So:

ConsoleAppender a0 = new ConsoleAppender(new SimpleLayout());
a0.activateOptions();
root.addAppender(a0);


May do the trick


Mark

-----Original Message-----
From: Kamal Ahmed [mailto:KAhmed@webMethods.com] 
Sent: Tuesday, February 14, 2006 6:36 PM
To: Log4J Users List
Subject: log4j:WARN No appenders could be found for logger 


How do we resolve:

 

How do we resolve:

log4j:WARN No appenders could be found for logger
(com.webmethods.sc.logging.test.unit.WmLoggerFilterTest).

log4j:WARN Please initialize the log4j system properly.

 

Step 1: Declare an Appender, e.g.

ConsoleAppender a0 = new ConsoleAppender(new SimpleLayout());

 

Step2: Declare a Logger e.g.                   

Logger root = Logger.getRootLogger();

 

Step3: attach the Appender to the logger e.g.

                                      root.addAppender(a0);

 

                   

1.      Is this correct?

2.      Is this the only way?

Thanks,

-Kamal.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message