Automatically process queue

This commit is contained in:
Serraniel 2019-02-02 00:53:31 +01:00
parent babe1a71be
commit 0b95c41108
Signed by untrusted user who does not match committer: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -18,6 +18,8 @@ namespace SweetLib.Utils.Logger.Memory
public string ArchiveFile { get; set; }
public bool AutoProcessQueue { get; set; } = true;
public bool AutoArchiveOnDispose { get; set; } = true;
public ArchivableConsoleLogMemory() : this(null) { }
@ -102,6 +104,9 @@ namespace SweetLib.Utils.Logger.Memory
LogQueue.Enqueue(message);
Console.ForegroundColor = consoleColor;
if (AutoProcessQueue)
ProcessQueue();
}
@ -161,8 +166,6 @@ namespace SweetLib.Utils.Logger.Memory
}
catch (FileNotFoundException)
{
if (disposing)
throw;
}
}