jptoto/log4net.ElasticSearch — pull request #25 by jc74 (2014-11-04 00:07:33+00:00)
Title: Refactor appender

Hey,

I haven't exactly done what I'd said - but I have made it async and kept it in line with how log4net works.

Basically the Appender now extends BufferingAppenderSkeleton - allowing log4net to manage the buffer/behaviour [with Lossy and BufferSize properties]. The Appender now overrides ActivateOptions so that initialisation & validation is done once. It also overrides SendBuffer to allow multiple items to be written to ES in a single hit. Regarding async, I've used ManualResetEvent and Interlock to manage thread[s] - trying to keep locks to a minimum.

I haven't tested the async work yet. I'll get to it shortly but wanted to get more eyes on it and agreement on the approach before I continue. Also, I'm not yet making use of ES's bulk operations.

Let me know what you think.