Hi Nicholas

On 2016-11-01, Nicholas Duane wrote:

> Got some questions around this.  I was hoping that if I put the call
> to LogManager.Shutdown() in my application it might call Close() on
> all the appenders.  However, that doesn't seem to be the case.

That's what I would have expected as well. This is code I've never
touched and I'm not familiar with the implementation choices back then,
but LogManager.Shutdown() leads to Logger.CloseNestedAppenders() which
only closes Appenders that are IAppenderAttachable.

I'm what to make from this myself.

> Not sure if the Flush() you talk about is something that might have
> solved my problem.

At least it is going to Flush all appenders.

> I checked over the links you provided.  One talks about implementing a
> queue in an async appender so that each developer wouldn't have to do
> it.  While that certainly sounds like a good thing to do, even this
> implementation would need to flush its queue, or at least do as much
> as it could in the time allotted, when the process shuts down.  That
> is the main point I'm trying to bring up as my appender has its own
> queue but the Close() method doesn't give me any significant amount of
> time to flush my queue and thus I'm losing events.

Ideas for a new implementation of the AsyncAppender are currently
discussed on the dev mailing list.

Stefan

Reply via email to