[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-user
Subject:    RE: Turbine 2.3.0/Commons-Logging configuration under Tomcat 5.5
From:       "David Demner" <turbine2 () demner ! com>
Date:       2006-12-09 3:00:55
Message-ID: 011901c71b3e$3edad6c0$6a00a8c0 () edgemain
[Download RAW message or body]

Martin,

I've also found that rogue log4j jar files (in WEB-INF/lib, or tomcat's
common/lib, server/lib, or shared/lib) can cause this double initialization.

Good luck,

David

-----Original Message-----
From: Martin Lidgard [mailto:martin@arkatay.com] 
Sent: December 8, 2006 1:04 AM
To: 'Turbine Users List'
Subject: Turbine 2.3.0/Commons-Logging configuration under Tomcat 5.5

Hello,
 
I am working on upgrading our hosting environment from Tomcat 4.1 to Tomcat
5.5. In our current Tomcat 4.1 environment we are running Turbine 2.3
(2.3.0, not 2.3.2) with commons-logging-1.0.4 and log4j-1.2.8 using more or
less the default logging configuration from Turbine.  When upgrading to
Tomcat 5.5 the logging does not work as intended.
 
Logging is written to the webapp's local log as expected during startup,
with logging level DEBUG for the log4j.logger.myapp entry:
myapp.log (22817 bytes)
scheduler.log (127 bytes)
torque.log (0 bytes)
turbine.log (0 bytes)
velocity.log (0 bytes)
 
Initialization logging is written to /var/log/tomcat/catalina.out, showing
among other things an init of Log4j:
[...]
log4j: Parsing for [root] with value=[DEBUG, console, myapp].
log4j: Level token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "console".
log4j: Parsing layout options for "console".
log4j: Setting property [conversionPattern] to [%-5r %-5p %-25.25c{1} -
%m%n].
log4j: End of parsing for "console".
log4j: Setting property [threshold] to [DEBUG].
log4j: Parsed "console" options.
log4j: Parsing appender named "myapp".
log4j: Parsing layout options for "myapp".
log4j: Setting property [conversionPattern] to [%d %-5p %c{1} - %m%n].
log4j: End of parsing for "myapp".
log4j: Setting property [append] to [true].
log4j: Setting property [file] to
[/usr/local/tomcat/webapps/myapp//logs/myapp.log].
log4j: Setting property [threshold] to [DEBUG].
log4j: setFile called: /usr/local/tomcat/webapps/myapp//logs/myapp.log, true
log4j: setFile ended
log4j: Parsed "myapp" options.
[...]
 
After a number of lines of log messages in catalina.out describing
initialization of Turbine services, there seems to be a second Log4j
initialization using the same configuration as above.
After this, debug messages that are specific to the initialization of
"myapp" are written to both catalina.out and webapps/myapp/logs/myapp.log,
as expected.
 
However, when performing the first request to the servlet, no further debug
logging is written to either catalina.out or myapp.log. Only INFO-level
logging is written to catalina.out describing the late initialization of the
Turbine services.
 
Is Log4j reconfigured somehow during the request without telling? Could
there be a link missing between Tomcat's request and the logging? Any ideas
or sample configurations would be greatly appreciated.
 
Thanks,
 
Martin


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



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic