...log.LogImpl.reset() called on shutdown, Jetty 5.1.5

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

...log.LogImpl.reset() called on shutdown, Jetty 5.1.5

Eric White-3
I've got a custom LogSink that writes to syslog, written for Jetty 5.1.5
Once I set the LogFactory system property (via the command line -D... I
couldn't get the jetty.xml configuration to work for me...) my Jetty
logs (debugs, traces and all) started showing up in syslog -- until
shutdown.

There's a point, in my fancy syslog representation, where I can see:

org.mortbay.log.LogImpl.reset()

called and thereafter all shutdown logging (debugs, traces and all) are
sent to stdout via the OutputStreamLogSink.

I think I've narrowed it down to the method
org.mortbay.log.Factory.release() wherein log.reset() is called.

I think HttpContext.doStop() is calling Factory.release() in this code
snippet:


            // TODO this is a poor test
            if (_loader instanceof ContextLoader)
            {
                ((ContextLoader)_loader).destroy();
                LogFactory.release(_loader);
            }


Can anyone confirm my analysis?

If this isn't a bug, does anyone have a workaround or the correct way I
can continue to use my custom LogSink on shutdown, short of subclassing
org.mortbay.log.Factory and overriding the release() method?



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: ...log.LogImpl.reset() called on shutdown, Jetty 5.1.5

Greg Wilkins-5

I have changed this in CVS ready for the next release.

It was wrong to call reset from release.   release should only release Logs
that have been dynamically created.

thanks


Eric White wrote:

> I've got a custom LogSink that writes to syslog, written for Jetty 5.1.5
> Once I set the LogFactory system property (via the command line -D... I
> couldn't get the jetty.xml configuration to work for me...) my Jetty
> logs (debugs, traces and all) started showing up in syslog -- until
> shutdown.
>
> There's a point, in my fancy syslog representation, where I can see:
>
> org.mortbay.log.LogImpl.reset()
>
> called and thereafter all shutdown logging (debugs, traces and all) are
> sent to stdout via the OutputStreamLogSink.
>
> I think I've narrowed it down to the method
> org.mortbay.log.Factory.release() wherein log.reset() is called.
>
> I think HttpContext.doStop() is calling Factory.release() in this code
> snippet:
>
>
>             // TODO this is a poor test
>             if (_loader instanceof ContextLoader)
>             {
>                 ((ContextLoader)_loader).destroy();
>                 LogFactory.release(_loader);
>             }
>
>
> Can anyone confirm my analysis?
>
> If this isn't a bug, does anyone have a workaround or the correct way I
> can continue to use my custom LogSink on shutdown, short of subclassing
> org.mortbay.log.Factory and overriding the release() method?
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support