here is another updated patch after correct merging with your latest changes
to Turbine.java

fedor.

-------------------------------
Amicus Plato amicus Aristoteles magis amica veritas

> -----Original Message-----
> From: Jason van Zyl [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 10, 2001 6:37 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PATCH] turbine logging before logging service is
> initialized
> 
> 
> On 10/9/01 2:36 PM, "Fedor Karpelevitch" 
> <[EMAIL PROTECTED]>
> wrote:
> 
> > here is an improved patch - it does printout all the log 
> messages in the
> > case when Logging service fails to initialize.
> 
> Thanks, I will apply it.
>  
> > fedor.
> > 
> > -------------------------------
> > "That's one small step for man, one giant leap for 
> mankind." - Jesus Christ,
> > the sea of Tiberias
> > 
> >> -----Original Message-----
> >> From: Fedor Karpelevitch [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, October 08, 2001 2:43 PM
> >> To: Turbine-Dev (E-mail)
> >> Subject: [PATCH] turbine logging before logging service is 
> initialized
> >> 
> >> 
> >> Hi!
> >> 
> >> Here is the problem: before the logging service is
> >> initialized and enabled
> >> Turbine.java logs using standard servlet logging (which
> >> happens to be stdout
> >> when running standalone) and TurbineServices.java logs to
> >> stdout. Sometimes
> >> getting those few messages in the output may be annoying and
> >> sometimes is a
> >> real problem, for example if you producing some output for
> >> another program
> >> to pipe in and parse (which is the case for me). I believe 
> the normal
> >> behaviour would be to _always_ use turbine logging facilities.
> >> 
> >> So here is what this patch does:
> >> 
> >> 1. Turbine.java overrides servlet's log methods and calls
> >> TurbineServices'
> >> logging methods, so all servlet logging goes to Turbine logging
> >> 
> >> 2. Changed TurbineServices' logging methods so that, when
> >> logging service is
> >> not yet initialized the messages are cached in memory 
> instead of being
> >> printed to stdout. As soon as logging service is initialized
> >> and enabled all
> >> the cached messages are dumped into the logger, so they 
> are not lost.
> >> 
> >> 3. In case we never get to successfully initialize logging 
> service we
> >> attempt to dump the cached messages in the finalizer of
> >> TurbineServices. I
> >> could not find a better place to do that.
> >> 
> >> This is the cleanest solution I could come up with. I hope 
> it is clean
> >> enough. Let me know if there is any problem with this or 
> if you know a
> >> better way.
> >> If nobody has any problem could someone please commit it or
> >> i'll commit it
> >> in a while.
> >> 
> >> fedor.
> >> 
> >> -------------------------------
> >> Amicus Plato amicus Aristoteles magis amica veritas
> >> 
> >> 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -- 
> 
> jvz.
> 
> Jason van Zyl
> 
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Attachment: torque8.diff
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to