diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Logging/LogManager.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Logging/LogManager.cs | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/Software/Visual_Studio/Tango.Logging/LogManager.cs b/Software/Visual_Studio/Tango.Logging/LogManager.cs index 43f40fcbe..b97058bfe 100644 --- a/Software/Visual_Studio/Tango.Logging/LogManager.cs +++ b/Software/Visual_Studio/Tango.Logging/LogManager.cs @@ -184,30 +184,23 @@ namespace Tango.Logging //[DebuggerHidden] private static void LoggingThreadMethod() { - while (_logs.Count > 0) + while (_isStarted) { - LogItemBase log; - - if (_logs.TryDequeue(out log)) + while (_logs.Count > 0) { - if (log != null) + LogItemBase log; + + if (_logs.TryDequeue(out log)) { - _loggers.Where(x => x.Enabled && !x.Immediate).ToList().ForEach(x => x.OnLog(log)); + if (log != null) + { + _loggers.Where(x => x.Enabled && !x.Immediate).ToList().ForEach(x => x.OnLog(log)); + } } } Thread.Sleep(10); } - - Thread.Sleep(400); - - if (_logs.Count > 0) - { - LoggingThreadMethod(); - return; - } - - _isStarted = false; } /// <summary> |
