Created
September 28, 2018 13:55
-
-
Save GeorgeTsiokos/404f5e9ab90d37728fa9adcf632cacd4 to your computer and use it in GitHub Desktop.
ConsoleLogger may not write all output before the process closes. This code ensures the queue is flushed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Flush(ConsoleLogger consoleLogger) | |
{ | |
var fieldInfo = typeof(ConsoleLogger).GetField("_queueProcessor", BindingFlags.Instance | BindingFlags.NonPublic); | |
var consoleLoggerProcessor = (ConsoleLoggerProcessor)fieldInfo.GetValue(consoleLogger); | |
consoleLoggerProcessor.Dispose(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment