The WARN message that you are seeing, indicates that the log4j.properties file 
is NOT in your classpath. Place the file in your classpath.  Some days back 
there was a similar question where the user reported that he was seeing the 
same WARN message. Here's an extract from that thread:
   
  -------------------------------------
  -----Original Message-----
  From: James Stauffer [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 29, 2006 8:20 PM
  To: Log4J Users List
  Subject: Re: Ant Log4J not working
   
  If you added -Dlog4j.debug to the command line log4j will output info
  to std. out. telling you how it tries to configure itself.
  On 6/29/06, jaikiran pai <[EMAIL PROTECTED]> wrote:
  > Rohit,
  > This means that the log4j.properties file that you have created in NOT in 
the classpath. Make it available in the classpath.
  >
  > regards,
  > -Jaikiran
  >
  > Rohit B Rai <[EMAIL PROTECTED]> wrote:
  > I am trying to use Log4J for logging from Ant but it gives these errors.
  >
  >
  >
  > log4j:WARN No appenders could be found for logger
  > (org.apache.tools.ant).
  >
  > log4j:WARN Please initialize the log4j system properly.
   
  ------------
   
  regards,
  -Jaikiran

"Dmitry S. Kravchenko" <[EMAIL PROTECTED]> wrote:
  

-----Original Message-----
From: Dmitry S. Kravchenko [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 05, 2006 6:04 PM
To: '[EMAIL PROTECTED]'
Subject: No appenders could be found for logger


Hi!

I don't understand, how to use log4j in Tomcat. It seems to me, that docs
and help are not reliable. For example, Category class ang getCategory
method marked deprected in fact, but described usable in quick start guide.

I have some servlets, I have some class with the following code in
constructor

if( logger == null ) {
// BasicConfigurator.configure();
logger = Logger.getLogger("MetSession");
}

(logger is static)

and the following code for logging 

logger.debug( prefix + message );

I have log4j-1.2.13.jar file in my C:\j2sdk1.4.2_10\jre\lib\ext directory,
and I have file log4j.properties in my WEB-INF/classes directory.

The content fo properties file is following

log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=/var/log/tomcat4/vtlog4j.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%c{1},%p] %m%n
log4j.appender.file.Append=true log4j.category.org.firebirdsql=DEBUG, file

So, it seems to me, that all is according to the manual.

But it prints warning 

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

while starting Tomcat.

What does this warning mean? What should I do to fix it?

Thanks in advance.

Dims


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



                                
---------------------------------
 Yahoo! India Answers: Share what you know. Learn something new Click here
Catch all the FIFA World Cup 2006 action on Yahoo! India Click here

Reply via email to