tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albretch Mueller" <lbrt...@gmail.com>
Subject Re: Still trying to log using org.apache.juli.FileHandler ...
Date Sat, 08 Dec 2007 16:32:07 GMT
 Thanks for your help Chuck and I have started to suspect the
documentation a bit or something weird may be happening
~
> Did you miss this part of the doc?
~
"You would place a similar log4j.properties file in your web
application's WEB-INF/classes folder, and log4j1.2.8.jar into
WEB-INF/lib. Then specify your package level logging. This is a basic
setup of log4j which does *not* require Commons-Logging"
~
 Yes, I had done that even though I forgot to mention it
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~
 Granted, even though I have done quite a bit of servlets coding using
tomcat (pre. 4.1X) for production environments, I stopped coding
servlets for some time already, but I don't think I would qualify as a
noob
~
 I have even dropped this conf issue for a while to give a fresh view
and even carefully read both
~
 http://tomcat.apache.org/tomcat-6.0-doc/logging.html
~
 http://tomcat.apache.org/tomcat-5.5-doc/logging.html
~
 to see if there were something missing in the tomcat-6.0 logging
documentation and I did notice differences in the docs:
~
 1._ TC_5.5.X wants you to download and place Log4J (v1.2 or later)
jar in $CATALINA_HOME/common/lib NOT $CATALINA_HOME/lib as is the case
with TC_6.
~
 2._ TC_5.5.X wants you to download and place the commons-logging.jar
(not commons-logging-api.jar) in $CATALINA_HOME/common/lib with the
log4j jar. For TC_6 you should build extras.xml ant build from TC
source and replace $CATALINA_HOME/bin/tomcat-juli.jar with
output/extras/tomcat-juli.jar, as well as place
output/extras/tomcat-juli-adapters.jar in $CATALINA_HOME/lib.
~
 which I did
~
root@Knoppix:/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/bin# ls -l
tomcat-juli*.*
-rwxrwxrwx 1 knoppix knoppix 43522 Dec  7 18:10 tomcat-juli.jar
-rwxrwxrwx 1 knoppix knoppix 17508 Jul 19 23:20 tomcat-juli.old.jar~
root@Knoppix:/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/bin# md5sum
tomcat-juli*.*
a3cf056cefe384c33f65a73c18277b85  tomcat-juli.jar
026e9dd179d54dd826fa0ecd485a60fc  tomcat-juli.old.jar~
~
root@Knoppix:/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib# md5sum
tomcat-juli*.*
881f04ebfe539cb9a17499a00ea37700  tomcat-juli-adapters.jar
~
// __ I did include log4j-1.2.8.jar in the webapp's /WEB-INF/lib
directory and went as far as using the same log4j-1.2.8.jar in
{$catalina.home}/conf
~
root@Knoppix:~# ls -l /media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j*.*
-rwxrwxrwx 1 knoppix knoppix 358085 Dec  7 18:10
/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j-1.2.12.jar~
-rwxrwxrwx 1 knoppix knoppix 352668 Feb 20  2003
/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j-1.2.8.jar
-rwxrwxrwx 1 knoppix knoppix    546 Dec  8 06:32
/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j.properties
root@Knoppix:~# md5sum /media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j*.*
223504f742addd3f631ed8bdf689f1c9
/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j-1.2.12.jar~
18a4ca847248e5b8606325684342701c
/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j-1.2.8.jar
046c0cdd041de8ad4e8c4335e4d33eab
/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j.properties
~
root@Knoppix:~# ls -l
/media/sdc5/tc-6.0.14/webapps02/fileupload/WEB-INF/lib/log4j*.*
-rwxrwxrwx 1 knoppix knoppix 352668 Feb 20  2003
/media/sdc5/tc-6.0.14/webapps02/fileupload/WEB-INF/lib/log4j-1.2.8.jar
root@Knoppix:~# md5sum
/media/sdc5/tc-6.0.14/webapps02/fileupload/WEB-INF/lib/log4j*.*
18a4ca847248e5b8606325684342701c
/media/sdc5/tc-6.0.14/webapps02/fileupload/WEB-INF/lib/log4j-1.2.8.jar
~
// __ Here is my {$catalina.home}/lib/log4j.properties
~
root@Knoppix:~# cat
/media/sdc5/tc-6.0.14/apache-tomcat-6.0.14/lib/log4j.properties
log4j.rootLogger=debug, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/media/sdc5/tc-6.0.14/logs/tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina=DEBUG, R

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG,
R
log4j.logger.org.apache.catalina.core=DEBUG, R
log4j.logger.org.apache.catalina.session=DEBUG, R
~
// __ and my web apps logging conf
~
root@Knoppix:~# cat
/media/sdc5/tc-6.0.14/webapps02/fileupload/WEB-INF/classes/log4j.properties
log4j.rootLogger=debug, UpFl
log4j.appender.UpFl=org.apache.log4j.RollingFileAppender
log4j.appender.UpFl.File=/media/sdc5/tc-6.0.14/logs/tc-6.0.14_fileupload.log
log4j.appender.UpFl.MaxFileSize=10MB
log4j.appender.UpFl.MaxBackupIndex=10
log4j.appender.UpFl.layout=org.apache.log4j.PatternLayout
log4j.appender.UpFl.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina=DEBUG, UpFl

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG,
UpFl
log4j.logger.org.apache.catalina.core=DEBUG, UpFl
log4j.logger.org.apache.catalina.session=DEBUG, UpFl

~
// __ I also declared swallowOutput="true" in my
/media/sdc5/tc-6.0.14/webapps02/fileupload/META-INF/context.xml file:
~
<Context path="/fileupload"
	docBase="/media/sdc5/tc-6.0.14/webapps02/fileupload"
	reloadable="true"
	crossContext="true"
        swallowOutput="true">
</Context>
~
// __  I don't think it relates to the OS but here is what my system
is based on:
~
root@Knoppix:~# uname -a
Linux Knoppix 2.6.19 #7 SMP PREEMPT Sun Dec 17 22:01:07 CET 2006 i686 GNU/Linux
~
root@Knoppix:~# JAVA_HOME=/media/sdc2/inst/JAVA/jdk1.6.0_03
root@Knoppix:~# export JAVA_HOME
root@Knoppix:~# java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
~
/dev/sdc2 on /media/sdc2 type reiserfs (rw,nosuid,nodev)
/dev/sdc5 on /media/sdc5 type vfat
(rw,nosuid,nodev,umask=000,shortname=winnt,uid=1000,gid=1000)
~
 Logging from /lib/log4j.properties in
/media/sdc5/tc-6.0.14/logs/tomcat.log is working fine but not for the
webapp. No file is created in the defined logs directory
System.out.println("...") is not working either and I can not see any
errors in /media/sdc5/tc-6.0.14/logs/tc-6.0.14_fileupload.log
~
 How can I fix this annoying problem?
~
 Thank you
 lbrtchx

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message