changeset 218:babe55c34931 v2

Trace logical operations in the correct channel
author cin
date Thu, 04 May 2017 02:17:53 +0300
parents 6efb77590b15
children cc1baf7c8bd9
files Implab/Diagnostics/Trace.cs Implab/Diagnostics/TraceContext.cs
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
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>
--- a/Implab/Diagnostics/TraceContext.cs	Tue May 02 17:33:04 2017 +0300
+++ b/Implab/Diagnostics/TraceContext.cs	Thu May 04 02:17:53 2017 +0300
@@ -48,7 +48,7 @@
         }
 
         public void StartLogicalOperation(string name) {
-            LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name));
+            //LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name));
             m_current.BeginLogicalOperation(name);
         }