tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: Tomcat 5.5 upgrade + logging problems
Date Fri, 12 Aug 2005 12:56:30 GMT
Hi Robert,

The fact is that followed precisely the instructions do work. I *almost* guarantee this because
I walked through it just last week with a guy on a vanilla Tomcat 5.5.9 install and I deal
with Tomcat and logging daily.

The question is, what kind of logging do you want, because there are 2 types. The old FileLogger
was internal logging mixed with webapp logging. Tomcat 5.5 aims to decouple itself from a
custom logging implementation and uses the Commons Logging wrapper to allow developers to
customise their logging output in a more flexible and powerful way. 

Therefore the developers did not do a *bad thing* as you describe, you are simply peeved off
that you don't understand the change. That's natural, noone likes change, but change is inevitable
if we are to do things better. Granted that FileLogger was probably easier, but it was not
as powerful or flexible. And perhaps the logging page is not the most straightforward but
it does work when followed.

So now, if you want Tomcat core classes logging, i.e internal Tomcat logging, then you need
to have a log4j.properties file inside tomcat/common/classes and *both* the log4j jar *and*
commons logging jar in tomcat/common/lib. This information in my view is not all that useful
unless you're trying to get to the nitty gritty of what's happening. More than likely you
are more interested in per-webapp logging.

If you want logging for a web application in particular, then you need a log4j.properties
in the webapp's classes folder and log4j jar only in the lib.

History on this list shows us that logging configuration issues like these are almost always
caused by something the user has misunderstood or done in their "customisation" or web application.


As for the multiple virtual hosts with webapps;

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/yourwebappname]=DEBUG,
R

You'll recognise localhost is a servername, so perhaps you could try using your virtual host
name and let us know if that works.

Cheers, Allistair.

> -----Original Message-----
> From: Robert Abbate [mailto:director@ispconcepts.com]
> Sent: 12 August 2005 01:37
> To: Allistair Crossley
> Subject: RE: Tomcat 5.5 upgrade + logging problems
> 
> 
> I appreciate your response, but I can assure you there are 
> many out there
> which are not able to get this going EVEN after following the scant
> instructions. I had consulted at least 5 other webhosting 
> companies that I
> am in contact with all having the same issue. There is 
> something wrong and
> not much help so far. Tomcat developers did a bad thing by 
> removing support
> for Logger element. They didn't have to do that since it worked fine.
> 
> Also, I see your site doesn't address a virtual /multiple host setup; I have
> not seen any help anywhere on this setup as we are requesting.
> 
> 
> -----Original Message-----
> From: Allistair Crossley [mailto:Allistair.Crossley@QAS.com]
> Sent: Friday, August 12, 2005 3:07 AM
> To: Tomcat Users List
> Subject: RE: Tomcat 5.5 upgrade + logging problems
> 
> 
> Really, this has been discussed to death on this mailing list. The 5.5
> logging page for a start gives you instructions for setting 
> logging up.
> Also, I have a blog at www.adcworks.com/blog that touches on 5.5
> configuration and logging.
> 
> Allistair.
> 
> > -----Original Message-----
> > From: Robert Abbate [mailto:director@ispconcepts.com]
> > Sent: 11 August 2005 15:43
> > To: tomcat-user@jakarta.apache.org
> > Subject: Tomcat 5.5 upgrade + logging problems
> >
> >
> > Hi. I have searched through archives and online for such
> > solutions for the
> > depreciated "<Logger" element. We have a virtual host setup
> > and requires
> > separate logs for each host. We have followed the
> > instructions such as this:
> >
> > jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html
> >
> > we've put log4j.properties file in each host's
> > WEB-INF/classes folder, and
> > log4j1.2.8.jar into WEB-INF/lib in each host
> >
> > still, nothing seems to work. there must be something we 
> are missing.
> >
> >
> > CONFIGURATION:
> >
> > CATALINA_HOME="/var/tomcat5"
> > TOMCAT_USER="apache"
> > JAVA_HOME="/usr/java"
> > CATALINA_OPTS="-Xmx1228M -Djava.awt.headless=true"
> >  java= 1.5.0_03
> >
> > server.xml
> > ....CUT....
> > <Host name="domain.com" unpackWARs="true" autoDeploy="true"
> > appBase="/home/rondelli/html">
> >   <Realm className="org.apache.catalina.realm.MemoryRealm"
> > pathname="/var/tomcat5/conf/tomcat-users/rondelli-t
> > omcat-users.xml"/>
> >   <Context path="" docBase="/home/rondelli/html" debug="0"/>
> > <Alias>www.domain.com</Alias>
> > <Context path="/tomcatmanager"
> > docBase="/var/tomcat5/server/webapps/manager"
> > debug="0" privileged="true"/>
> >      <Logger className="org.apache.catalina.logger.FileLogger"
> > prefix="domain.com_log." suffix=".txt" directo
> > ry="/home/rondelli" timestamp="true"/>
> > </Host>
> >
> > <Host name="domain2.com" unpackWARs="true" autoDeploy="true"
> > appBase="/home/revisionten/html">
> >   <Realm className="org.apache.catalina.realm.MemoryRealm"
> > pathname="/var/tomcat5/conf/tomcat-users/revisionte
> > n-tomcat-users.xml"/>
> >   <Context path="" docBase="/home/revisionten/html" debug="0"/>
> > <Alias>www.domain2.com</Alias>
> > <Context path="/tomcatmanager"
> > docBase="/var/tomcat5/server/webapps/manager"
> > debug="0" privileged="true"/>
> >      <Logger className="org.apache.catalina.logger.FileLogger"
> > prefix="domain2.com_log." suffix=".txt" dire
> > ctory="/home/revisionten" timestamp="true"/>
> > </Host>
> > ....CUT.....
> >
> >
> > /usr/java/bin/java
> > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLo
> > gManager -Xmx1228M -Djava.awt.headless=true
> > -Djava.endorsed.dirs=/var/tomcat
> > 5/common/endorsed -classpath
> > :/var/tomcat5/bin/bootstrap.jar:/var/tomcat5/bin/commons-loggi
> > ng-api.jar:/us
> > r/java/jre/lib/mysql-connector-java-3.0.15-ga-bin.jar:/var/tom
> > cat5/common/li
> > b/log4j-1.2.8.jar -Dcatalina.base=/var/tomcat5
> > -Dcatalina.home=/var/tomcat5
> > -Djava.io.tmpdir=/var/tomcat5/temp
> > org.apache.catalina.startup.Bootstrap
> > start
> >
> > Does anyone have a setup like this and can offer any clues?
> > If you need any
> > further config details, please ask. I hope I gave all necessary.
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
> -------------------------------------------------------
> QAS Ltd.
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> -------------------------------------------------------
> </FONT>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 

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


Mime
View raw message