OK, I think, this time I did follow the FM ;-) at:
~
 http://tomcat.apache.org/tomcat-6.0-doc/logging.html
~
> 1._ I did create a log4j.properties file and placed it in $CATALINA_HOME/lib
~
C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\lib>dir *.properties
 Volume in drive C is IBM_PRELOAD
 Volume Serial Number is 509C-397F

 Directory of C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\lib

12/07/2007  10:27 AM               380 log4j.properties
               1 File(s)            380 bytes
               0 Dir(s)  24,878,350,336 bytes free

C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\lib>type log4j.properties
log4j.rootLogger=debug, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/cmllpz/prjx/java/GWB/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
~
> 2. v1.2 or later is in $CATALINA_HOME/lib
~
C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\lib>dir log4j*.jar
 Volume in drive C is IBM_PRELOAD
 Volume Serial Number is 509C-397F

 Directory of C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\lib

08/24/2007  11:29 PM           391,834 log4j-1.2.15.jar
               1 File(s)        391,834 bytes
               0 Dir(s)  24,878,350,336 bytes free
~
> 3. I did build extras.xml ant build script from the Tomcat source bundle, and
~
> 3.1 replaced(/renamed) $CATALINA_HOME/bin/tomcat-juli.jar with 
> output/extras/tomcat-juli.jar
~
C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\bin>dir tomcat-juli*.*
 Volume in drive C is IBM_PRELOAD
 Volume Serial Number is 509C-397F

 Directory of C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\bin

12/07/2007  09:41 AM            43,527 tomcat-juli.jar
07/20/2007  03:20 AM            17,508 tomcat-juli.old.jar~
               2 File(s)         61,035 bytes
               0 Dir(s)  24,878,284,800 bytes free
~
> 3.2 placed output/extras/tomcat-juli-adapters.jar in $CATALINA_HOME/lib
~
C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\lib>dir tomcat-juli-adapters*.*
 Volume in drive C is IBM_PRELOAD
 Volume Serial Number is 509C-397F

 Directory of C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\lib

12/07/2007  09:41 AM            20,913 tomcat-juli-adapters.jar
               1 File(s)         20,913 bytes
               0 Dir(s)  24,878,284,800 bytes free
~
 then when I started tomcat and saw that
C:/cmllpz/prjx/java/GWB/logs/tomcat.log was created as indicated in
~
 log4j.appender.R.File=C:/cmllpz/prjx/java/GWB/logs/tomcat.log
~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~
 but when I declared a log4j.properties file inside of a webapp
~
C:\cmllpz\prjx\java\GWB\webappsDir_tc-6.0.14\webapps02\fileupload\WEB-INF\classes>dir
*.properties
 Volume in drive C is IBM_PRELOAD
 Volume Serial Number is 509C-397F

 Directory of 
C:\cmllpz\prjx\java\GWB\webappsDir_tc-6.0.14\webapps02\fileupload\WEB-INF\classes

12/07/2007  11:03 AM               394 log4j.properties
               1 File(s)            394 bytes
               0 Dir(s)  24,872,628,224 bytes free

~
C:\cmllpz\prjx\java\GWB\webappsDir_tc-6.0.14\webapps02\fileupload\WEB-INF\classes>type
log4j.properties
log4j.rootLogger=debug, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/cmllpz/prjx/java/GWB/logs/tc-6.0.14_fileupload.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

~
 no log file is created nor do I see any log messages anywhere
~
 I also tentatively tried to no avail and then discarded diferent things like:
~
 * placing commons-logging-1.1.jar from the source compilation in
$CATALINA_HOME/lib, because I found a little unclear that they said
comcompile the "commons-logging" from source using ant, but they
didn't specified what to do with it
~
 * replicating <catalian source folder>/conf/logging.properties in
$CATALINA_HOME/conf/logging.properties
~
 In the book Pro Apache Tomcat 6 from Mathew Moodie he also talks
about juli-type logging.properties files while using log4j, but when I
keep $CATALINA_HOME/conf/logging.properties, I get errors like:
~
Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.util.logging.LogManager$1.run(LogManager.java:166)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:156)
        at java.util.logging.Logger.getLogger(Logger.java:274)
        at 
org.apache.juli.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.java:180)
        at org.apache.juli.logging.impl.Jdk14Logger.<init>(Jdk14Logger.java:60)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:838)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
        at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:645)
        at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
~
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.util.logging.LogManager$3.run(LogManager.java:359)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.addLogger(LogManager.java:352)
        at java.util.logging.LogManager$1.run(LogManager.java:180)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:156)
        at java.util.logging.Logger.getLogger(Logger.java:274)
        at 
org.apache.juli.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.java:180)
        at org.apache.juli.logging.impl.Jdk14Logger.<init>(Jdk14Logger.java:60)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:838)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
        at 
org.apache.juli.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
        at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:645)
        at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
~
 How could I fix these problems?
~
 lbrtchx

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

Reply via email to