diff Implab/Diagnostics/TraceLog.cs @ 200:71e543dbe65a v2

working version of the project
author cin
date Fri, 14 Oct 2016 04:03:10 +0300
parents ea485487a424
children
line wrap: on
line diff
--- a/Implab/Diagnostics/TraceLog.cs	Fri Oct 14 03:33:17 2016 +0300
+++ b/Implab/Diagnostics/TraceLog.cs	Fri Oct 14 04:03:10 2016 +0300
@@ -34,7 +34,7 @@
         [Conditional("TRACE")]
         public static void EndLogicalOperation() {
             var op = TraceContext.Instance.EndLogicalOperation();
-            LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceEventType.OperationCompleted, String.Format("-{0} : {1}ms",op.Name, op.Duration)));
+            LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(op, TraceEventType.OperationCompleted,  String.Format("-{0} : {1}ms",op.Name, op.Duration)));
         }
 
         /// <summary>
@@ -44,7 +44,7 @@
         /// <param name="arguments">Arguments.</param>
         [Conditional("TRACE")]
         public static void TraceInformation(string format, params object[] arguments) {
-            LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Information, format, arguments));
+            LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceContext.Instance.CurrentOperation, TraceEventType.Information, format, arguments));
         }
 
         /// <summary>
@@ -54,12 +54,12 @@
         /// <param name="arguments">Arguments.</param>
         [Conditional("TRACE")]
         public static void TraceWarning(string format, params object[] arguments) {
-            LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Warning, format, arguments));
+            LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceContext.Instance.CurrentOperation, TraceEventType.Warning, format, arguments));
         }
 
         [Conditional("TRACE")]
         public static void TraceError(string format, params object[] arguments) {
-            LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Error, format, arguments));
+            LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceContext.Instance.CurrentOperation, TraceEventType.Error, format, arguments));
         }
 
         [Conditional("TRACE")]