aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Logging/LogManager.cs
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-02-10 02:13:37 +0200
committerRoy <roy.mail.net@gmail.com>2018-02-10 02:13:37 +0200
commit07e686eb253ffd29f36dbe530b3a17633e02b353 (patch)
treed9663f1c92a400349dffc743adb0114ee1a7f618 /Software/Visual_Studio/Tango.Logging/LogManager.cs
parentc8c9606e545f49aae3d9f0524775436adbdf27e9 (diff)
downloadTango-07e686eb253ffd29f36dbe530b3a17633e02b353.tar.gz
Tango-07e686eb253ffd29f36dbe530b3a17633e02b353.zip
Added support for motor controllers.
Diffstat (limited to 'Software/Visual_Studio/Tango.Logging/LogManager.cs')
-rw-r--r--Software/Visual_Studio/Tango.Logging/LogManager.cs31
1 files changed, 5 insertions, 26 deletions
diff --git a/Software/Visual_Studio/Tango.Logging/LogManager.cs b/Software/Visual_Studio/Tango.Logging/LogManager.cs
index d6750ce0b..43f40fcbe 100644
--- a/Software/Visual_Studio/Tango.Logging/LogManager.cs
+++ b/Software/Visual_Studio/Tango.Logging/LogManager.cs
@@ -156,14 +156,7 @@ namespace Tango.Logging
{
if (log != null)
{
- if (log.GetType() == typeof(ExceptionLogItem))
- {
- _loggers.Where(x => x.Enabled && x.Immediate).ToList().ForEach(x => x.OnError(log));
- }
- else
- {
- _loggers.Where(x => x.Enabled && x.Immediate).ToList().ForEach(x => x.OnTrace(log));
- }
+ _loggers.Where(x => x.Enabled && x.Immediate).ToList().ForEach(x => x.OnLog(log));
}
_logs.Enqueue(log);
@@ -187,8 +180,8 @@ namespace Tango.Logging
/// <summary>
/// Loggings thread method.
/// </summary>
- [DebuggerStepThrough]
- [DebuggerHidden]
+ //[DebuggerStepThrough]
+ //[DebuggerHidden]
private static void LoggingThreadMethod()
{
while (_logs.Count > 0)
@@ -199,14 +192,7 @@ namespace Tango.Logging
{
if (log != null)
{
- if (log.GetType() == typeof(ExceptionLogItem))
- {
- _loggers.Where(x => x.Enabled && !x.Immediate).ToList().ForEach(x => x.OnError(log));
- }
- else
- {
- _loggers.Where(x => x.Enabled && !x.Immediate).ToList().ForEach(x => x.OnTrace(log));
- }
+ _loggers.Where(x => x.Enabled && !x.Immediate).ToList().ForEach(x => x.OnLog(log));
}
}
@@ -238,14 +224,7 @@ namespace Tango.Logging
{
try
{
- if (log.GetType() == typeof(ExceptionLogItem))
- {
- _loggers.Where(x => x.Enabled).ToList().ForEach(x => x.OnError(log));
- }
- else
- {
- _loggers.Where(x => x.Enabled).ToList().ForEach(x => x.OnTrace(log));
- }
+ _loggers.Where(x => x.Enabled).ToList().ForEach(x => x.OnLog(log));
wroteLog = true;
}