protected internal override sealed void Write(LogEventInfo entry)
        {
            // send in a cloned copy so that we're a little safer from this
            // changing underneath us...
            var cloned = entry.Clone();
            var task = Task.Factory.StartNew(() => WriteAsync(cloned));

            // set..
            entry.SetTask(task);
            return;
        }
Beispiel #2
0
 /// <summary>
 /// Increases the number of messages.
 /// </summary>
 /// <param name="logEvent">The logging event.</param>
 protected override void Write(LogEventInfo logEvent)
 {
     this.Counter++;
     this.LastLogEvent = logEvent.Clone();
     this.LastMessage  = this.Layout.Render(logEvent);
 }