From f8e1ff79cc2fa09b52093c6e029392b3456ad8bb Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 10 Feb 2018 17:27:37 +0200 Subject: Added dispensers support on technician module. --- Software/Visual_Studio/Tango.Logging/LogManager.cs | 25 ++++++++-------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'Software/Visual_Studio/Tango.Logging') 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; } /// -- cgit v1.3.1