logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farrell, Timothy" <Timothy.Farr...@Compuware.com>
Subject RE: how do i get Log4j in Tomcat environment?
Date Thu, 07 Aug 2003 18:20:50 GMT
Jake,

Here is a copy of my log4j.xml file.  Let me know if you see anything
unusual or that may be contributing to my problems.

I did mean that my log4j.jar file is in the WEB_INF/lib directory.  

Everything is where is belongs.

Thanks again.

-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: Thursday, August 07, 2003 12:50 PM
To: Log4J Users List

At 12:24 PM 8/7/2003 -0400, you wrote:
>Jake,
>
>Thanks for your thoughts.
>
>I do have the log4j.jar file in the CATALINA_HOME/common/lib and the
>WEB-INF/classes as well.

I assume you meant WEB-INF/lib, not WEB-INF/classes.  The latter is the 
place for log4j.xml while the former is the place for log4j.jar.

>I am not getting any logging either.  The application is supposed to write
>to a file and does not.

I'd have to verify that you have things set up right by looking at your 
log4j.xml file.

>The problem appears to be that log4j is not starting due to the before
>mentioned error (i.e. the appender missing).

No, that is a totally separate problem.  If you actually do have log4j.jar 
in WEB-INF/lib, then your application logging environment is completely and 
utterly separated from the one Tomcat is using.  Since there is no 
interaction, the error you see can't be causing the error unless you have 
other libraries which are (improperly) configuring log4j without your 
realizing it and, thus, overriding your configuration.  Do you use 
commons-logging or log4j directly?  What other libraries do you have in 
your webapp?

>I also have the application writing to the console just so that I can see
if
>log4j is initializing upon startup.

You probably won't see default initialization unless you have debug="true" 
in log4j.xml.  Try that.  Try also setting the root logger to a level of 
debug so that you can be assured that your classes are actually debugging.

Jake

>Let me know if you have any additional thoughts.
>
>Sincerely,
>
>Tim
>
>-----Original Message-----
>From: Jacob Kjome [mailto:hoju@visi.com]
>Sent: Thursday, August 07, 2003 11:38 AM
>To: Log4J Users List
>
>
>I see that error in Tomcat5 as well.  I assume you have log4j.jar in
>CATALINA_HOME/common/lib?  Did you also add log4j.jar to WEB-INF/lib of
>your application?  If not, do that and make sure your log4j.xml is in
>WEB-INF/classes.  Everything should work fine for you.  The error is
>inconsequential.  When commns-logging (which Tomcat uses) finds log4j.jar,
>it uses it but there seems to be something wrong with the way they are
>configuring it.  It shouldn't affect your application in the least.  Just
>ignore the message.  Having log4j.jar in WEB-INF/lib gives you a completely
>separate logging environment than that of the server.
>
>BTW, are you not getting any logging from your application?  You should be
>if you have things configured correctly as I've described above.
>
>Jake
>
>At 09:57 AM 8/7/2003 -0400, you wrote:
>
>
> >I am getting a startup error now on Log4J that is hopefully leading me to
a
> >solution.  The error is:
> >
> >
> >
> >Log4j: WARN No appenders could be found for logger
> >(org.apache.commons.digester.Digester.sax).  Please initialize the log4j
> >system properly.
> >
> >
> >
> >I am currently running Tomcat 4.1.27 on XP-Pro.  I checked the log4j.xml
> >file and it includes the necessary appenders.  Does anyone know what may
be
> >causing this error.
> >
> >
> >
> >Thanks.
> >
> >
> >
> >Tim
> >
> >-----Original Message-----
> >From: Jacob Kjome [mailto:hoju@visi.com]
> >Sent: Wednesday, August 06, 2003 2:58 PM
> >To: Log4J Users List
> >
> >
> >What exactly is the current problem you are having?  Just add log4j.jar
to
> >WEB-INF/lib and log4j.properties or log4j.xml to WEB-INF/classes and you
> >are ready to go.  There are a couple of other options that are more
> >advanced, but this should get you going for now.
> >
> >Jake
> >
> >At 06:39 PM 8/6/2003 +0100, you wrote:
> > >Hi,
> > >Trying to use log4j in Tomcat environment. Seen loads of messages on
> > >this but haven't got
> > >Much useful stuff from them. Could someone direct me to an appropriate
> > >resource.
> > >Thanks
> > >KB
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
> >
> >
> >The contents of this e-mail are intended for the named addressee only. It
> >contains information that may be confidential. Unless you are the named
> >addressee or an authorized designee, you may not copy or use it, or
>disclose
> >it to anyone else. If you received it in error please notify us
immediately
> >and then destroy it.
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>
>The contents of this e-mail are intended for the named addressee only. It
>contains information that may be confidential. Unless you are the named
>addressee or an authorized designee, you may not copy or use it, or
disclose
>it to anyone else. If you received it in error please notify us immediately
>and then destroy it.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org


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



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 

  



Mime
View raw message