diff Implab/Diagnostics/Trace.cs @ 218:babe55c34931 v2

Trace logical operations in the correct channel
author cin
date Thu, 04 May 2017 02:17:53 +0300
parents a01d9df88d74
children 6f4630d0bcd9
line wrap: on
line diff
--- a/Implab/Diagnostics/Trace.cs	Tue May 02 17:33:04 2017 +0300
+++ b/Implab/Diagnostics/Trace.cs	Thu May 04 02:17:53 2017 +0300
@@ -29,6 +29,7 @@
         /// <param name="name">Name.</param>
         [Conditional("TRACE")]
         public static void StartLogicalOperation(string name) {
+            Channel.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name));
             TraceContext.Instance.StartLogicalOperation(name);
         }
 
@@ -38,7 +39,7 @@
         [Conditional("TRACE")]
         public static void EndLogicalOperation() {
             var op = TraceContext.Instance.EndLogicalOperation();
-            LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(op, TraceEventType.OperationCompleted, String.Format("-{0} : {1}ms", op.Name, op.Duration)));
+            Channel.LogEvent(new TraceEvent(op, TraceEventType.OperationCompleted, String.Format("-{0} : {1}ms", op.Name, op.Duration)));
         }
 
         /// <summary>