Thanks Jake,it worked. Bitap -----Original Message----- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 9:26 AM To: Log4J Users List Subject: Re: No appenders could be found for logger
So, you are saying, eventually, after your code using PropertyConfgurator runs, that logging starts working as you expect. But you are still worried about seeing the warning message before you configurator runs? Keep in mind that static loggers may be instantiated and used to log before your configuration code starts. You can help avoid this by putting a dummy configuration file in the classpath that Log4j can pick up using its default configuration, which it runs from a static block in LogManager. You can set the root logger level to OFF (might need to set up a dummy console appender or something, can't remember if that would be needed or not?). Once your configuration code runs, your loggers will start using that new configuration as log as you'd like and you won't be seeing any of those pesky log4j:WARN messages anymore. Jake At 10:13 AM 2/23/2006 -0500, you wrote: >Hi >I am using log4j in my application deployed in Webshere 5.1. >I am getting the following error on systemerr file > >log4j:WARN No appenders could be found for logger (APP). >log4j:WARN Please initialize the log4j system properly. > >I have configured the log4j by calling >PropertyConfigurator.configure(Properties file.) >The properties file is created by reading the log4j configuration from >database. >Following is the log4j configuration used. > > >log4j.rootLogger= DEBUG >log4j.loggerFactory = log.OFXLoggerFactory > >log4j.appender.A1=org.apache.log4j.RollingFileAppender >log4j.appender.A1.File = F:\LogFiles\OFX\OfxApp.log >log4j.appender.A1.MaxFileSize =5000KB >log4j.appender.A1.MaxBackupIndex=4 >log4j.appender.A1.layout=org.apache.log4j.PatternLayout > >log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n >log4j.loggerFactory=com.msdw.ofx.logging.OFXLoggerFactory > >log4j.logger.OFX = INFO, A1 >log4j.logger.APP = DEBUG, A1 > >I can see the logger name APP and OFX and they behave as configured,but >the error l >og4j:WARN No appenders could be found for logger (APP). >log4j:WARN Please initialize the log4j system properly is shown anyway. > >I have checked in code also that the appender is attached to the logger. >Thanks, >Bitap Raj >-------------------------------------------------------- > >NOTICE: If received in error, please destroy and notify sender. Sender does >not waive confidentiality or privilege, and use is prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
