/// <summary> /// Pause execution until all logger writes have completed and file handles have been closed. /// </summary> public static void Flush() { lock (flush_sync_lock) { backgroundScheduler.Dispose(); backgroundScheduler = new ThreadedScheduler(@"Logger") { Enabled = storage != null }; } }