logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry S. Kravchenko" <d...@vsetech.ru>
Subject RE: FW: No appenders could be found for logger
Date Wed, 05 Jul 2006 16:42:14 GMT
> If you want a separate config for each app, you need to put 
> log4j.jar in WEB-INF/lib and log4j.properties in WEB-INF/classes

So, this is what I have done. But it does not work.

> 
> On 7/5/06, Dmitry S. Kravchenko <dims@vsetech.ru> wrote:
> > Thank you.
> >
> > I'v already found this solution, but it seems to me, that it is not 
> > completely applicable for me. I want to have separate 
> properties for 
> > each web-application. Is it correct? Or I should have one global 
> > properties file for my server? In each case, I do not control 
> > classpath. Tomcat starts with the script. Several places, 
> in which I 
> > tried to place properties file, had no effect. Is there one 
> > convetional place to put properties file in the case of Tomcat 
> > webapps? Is there conventional way to patch Tomcat script 
> > configuration in order it to search this place?
> >
> > Dims.
> >
> > > -----Original Message-----
> > > From: jaikiran pai [mailto:jai_forums2005@yahoo.co.in]
> > > Sent: Wednesday, July 05, 2006 6:42 PM
> > > To: Log4J Users List
> > > Subject: Re: FW: No appenders could be found for logger
> > >
> > >
> > > 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:stauffer.james@gmail.com]
> > >   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 <jai_forums2005@yahoo.co.in> 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 <brohit@cordys.com> 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" <dims@vsetech.ru> wrote:
> > >
> > >
> > > -----Original Message-----
> > > From: Dmitry S. Kravchenko [mailto:dims@vsetech.ru]
> > > Sent: Wednesday, July 05, 2006 6:04 PM
> > > To: 'users@logging.apache.org'
> > > 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: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: 
> log4j-user-help@logging.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > >  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
> > >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> 
> 
> -- 
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 


---------------------------------------------------------------------
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