Mike Papper wrote:
> 
> I use the call to Category.shutdown to stop log4j. I have my own appender
> (which is a subclass of RollingFileAppender)
> and want to "rollover" that appender when log4j is shutdown. I cannot seem
> to find a method to override that lets me know when log4j is going away so I
> can initiate a rollover.
> 
> Is there a way?
> 
> Note that overriding finalize or the close method will not work.
> 
> Mike Papper
> [EMAIL PROTECTED]
> 

It looks like the Appender that you are using needs to implement the
org.apache.log4j.spi.AppenderAttachable interface. For some reason
shutdown process only calls the close() method on the Appender if it is
an instance AppenderAttachable. I can't tell you why this is true, but
it is. Maybe someone else on the list can help me understand. Otherwise
I would have to say it's a bug.

/mike


-- 
******************************************
 Mike Dougherty -- Java Software Engineer
******************************************

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

Reply via email to