Closed iwillspeak closed 5 years ago
Creates a new AsyncGelfHttpAppender which performs logging in the background as the other Async* appenders do.
AsyncGelfHttpAppender
Async*
This PR also makes a few refactorings to share code more amongst the async appenders:
BufferedLogSender
Task
async
BlockingCollection
CancellationTokenSource
CancellationToken
Still TODO:
Wow, finally :)
Thanks for the PR
Thanks for this!
Creates a new
AsyncGelfHttpAppender
which performs logging in the background as the otherAsync*
appenders do.This PR also makes a few refactorings to share code more amongst the async appenders:
BufferedLogSender
is added. This is responsible for queing and sending messages in the backgroundTask
for background processing. Usesasync
operations when sending data.BlockingCollection
for buffer of lines to send. This should be faster in this producer-consumer scenario.CancellationTokenSource
andCancellationToken
for cancellation of the background processing.Still TODO:
Task
count based on a parameter rather than hardcoding it