public async void Dispose()
{
// Dont do this more then once
if (Disposed) return;
Disposed = true;
// Dispose timer
LogTimer.Stop();
LogTimer.Dispose();
// Flush everything
if (LogQueue.Count > 0 && FlushTask.Status != TaskStatus.Running)
FlushLog();
else
await FlushTask;
// Dispose flusher
FlushTask.Dispose();
}