aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Logging/LogManager.cs
diff options
context:
space:
mode:
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;
}