On Thu, 2003-11-13 at 02:22, Dimitri Pissarenko wrote: > Hello! > > I'm getting the log4j error message > > <error-message> > log4j:WARN No appenders could be found for logger (SomeClass). > log4j:WARN Please initialize the log4j system properly. > </error-message> > >
Most likely candidate is that some where in the Test case code/thread of execution, that is re-initialising Log4j after your explicit init call, but before the call to the Logger in question. cheers, Paul > This happens in a test case, which has the following main function: > > <code-snippet> > import junit.framework.TestSuite; > > public class SomeTestSuite extends TestSuite { > > ... > public static void main(String[] args) { > ConsoleAppender consoleAppender=null; > > consoleAppender=new ConsoleAppender(); > BasicConfigurator.configure(); > Logger.getRootLogger().addAppender(consoleAppender); > > Logger.getLogger(SomeClass.class).addAppender(consoleAppender); > > junit.swingui.TestRunner.run(SomeTestSuite.class); > } > ... > } > </code-snippet> > > Why does this error occur despite that fact that I explicitly add > an appender to the Logger of SomeClass? > > How can solve this problem? > > TIA > > Dimitri Pissarenko > > PS: I'm using log4j 1.2.8 > > > --------------------------------------------------------------------- > 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]