logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@panix.com
Subject log4j doesn't close on tomcat shutdown
Date Wed, 17 May 2006 21:01:53 GMT
Hi -

java 1.5
tomcat 4.1.31
log4j 1.2.13
SunOS 5.8


The tomcat shutdown.sh doesn't close log4j when log4j
is used to implement commons-logging in a web app.
Any ideas about what mechanism to use to fix this?

I really appreciate any suggestions.

thank you,

_gory details_

I am using log4j to implement commons-logging in my web app:
In WEB-INF/classes/ I have
(1) commons-logging.properties =
(2) a log4j.properties
I put log4j.tar in WEB-INF/classes/lib.

To invoke the logger I simply make the usual commons-logging calls
in my java (struts) program:
(1)static Log log   = LogFactory.getLog( xxx.class );
(2)log.info("Here is some INFO");

This all works great.  But when
(1) I ran shutdown.sh (to close tomcat)
tomcat didn't fully close - the tomcat process was still
there when I do a 'ps'.
(2) As an experiment, I turned off
log4j (changed commons-logging.properties ....SimpleLog)
and restarted tomcat (startup.sh).
(3) But the log output was still in log4j format (I had
used pattern format).

So it seems tomcat didn't close the log4j 'handler' on shutdown
in (1) and therefore was unable to fully shutdown itself -
that's why it showed up in the 'ps'.

thanks very much.

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

View raw message