You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ceki Gülcü <ce...@qos.ch> on 2005/02/07 21:02:14 UTC
Re: [logging] releasing log4j resources
Shouldn't this web-app which apparently knows it is using log4j call
LogManger.shutdown() directly?
At 09:05 PM 2/7/2005, you wrote:
>http://issues.apache.org/bugzilla/show_bug.cgi?id=32662 describes an
>issues that arises when restarting web apps in tomcat. JCL bridges to
>log4j which has a rolling file appender configured. the file appender
>doesn't roll when the application is restarted. the proposed solution is
>to add a call to LogManager.shutdown.
>
>i'm a little worried that calling shutdown may be inappropriate in this
>circumstance the JVM isn't closing, just a web application. before i
>take this question to the log4j lists, i wondered whether any log4j
>experts would be so kind as to either confirm my concerns or set my mind
>at ease.
>
>- robert
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
--
Ceki Gülcü
The complete log4j manual: http://www.qos.ch/log4j/
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [logging] releasing log4j resources
Posted by Richard Sitze <rs...@us.ibm.com>.
robert burrell donkin <ro...@blueyonder.co.uk> wrote on
02/07/2005 02:45:28 PM:
> certainly the web application deployer should know :)
>
> IIRC it should be possible to tap into lifecycle events and perform the
> shutdown by creating a small amount of code external to the actual
> application.
>
> anyone object to me marking this one as WONTFIX?
+1 to mark as WONTFIX.
JCL *uses* a logger implementation, it shouldn't attempt to configure it
or manage it.
Consider:
Parent [commons-logging-api.jar, Log4j]
|
+----+----+
| |
ChildA ChildB [uses Log,
Log bound to Log4JLogger,
Log4JLogger bound to LogFactoryImpl,
LogFactoryImpl instance bound to ChildB]
When ChildB is disposed of, we currently do not have anyway of recognizing
that the LogFactoryImpl using Log4J is being managed by Parent or ChildB.
The ChildB classloader, or rather the LogFactoryImpl, should not attempt
to manage this resource, as that may cause problems for both Parent and
ChildA.
>
> - robert
>
> On Mon, 2005-02-07 at 20:02, Ceki Gülcü wrote:
> > Shouldn't this web-app which apparently knows it is using log4j call
> > LogManger.shutdown() directly?
> >
> > At 09:05 PM 2/7/2005, you wrote:
> > >http://issues.apache.org/bugzilla/show_bug.cgi?id=32662 describes an
> > >issues that arises when restarting web apps in tomcat. JCL bridges to
> > >log4j which has a rolling file appender configured. the file appender
> > >doesn't roll when the application is restarted. the proposed solution
is
> > >to add a call to LogManager.shutdown.
> > >
> > >i'm a little worried that calling shutdown may be inappropriate in
this
> > >circumstance the JVM isn't closing, just a web application. before i
> > >take this question to the log4j lists, i wondered whether any log4j
> > >experts would be so kind as to either confirm my concerns or set my
mind
> > >at ease.
> > >
> > >- robert
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
*******************************************
Richard A. Sitze
IBM WebSphere WebServices Development
Re: [logging] releasing log4j resources
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
certainly the web application deployer should know :)
IIRC it should be possible to tap into lifecycle events and perform the
shutdown by creating a small amount of code external to the actual
application.
anyone object to me marking this one as WONTFIX?
- robert
On Mon, 2005-02-07 at 20:02, Ceki Gülcü wrote:
> Shouldn't this web-app which apparently knows it is using log4j call
> LogManger.shutdown() directly?
>
> At 09:05 PM 2/7/2005, you wrote:
> >http://issues.apache.org/bugzilla/show_bug.cgi?id=32662 describes an
> >issues that arises when restarting web apps in tomcat. JCL bridges to
> >log4j which has a rolling file appender configured. the file appender
> >doesn't roll when the application is restarted. the proposed solution is
> >to add a call to LogManager.shutdown.
> >
> >i'm a little worried that calling shutdown may be inappropriate in this
> >circumstance the JVM isn't closing, just a web application. before i
> >take this question to the log4j lists, i wondered whether any log4j
> >experts would be so kind as to either confirm my concerns or set my mind
> >at ease.
> >
> >- robert
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: commons-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org