protected override void Write(NLog.Common.AsyncLogEventInfo[] logEvents) { try { logCollection.InsertBatch(logEvents.Select(l => ToDocument(l.LogEvent))); foreach (var logEvent in logEvents) { logEvent.Continuation(null); } } catch( Exception ex ) { foreach( var logEvent in logEvents ) { logEvent.Continuation(ex); } } }