# HG changeset patch # User cin # Date 2017-05-03 23:17:53 # Node ID babe55c34931de0a07e3919521a1f0171e7c0d5e # Parent 6efb77590b15ca811be29ac1b35b1e67025cb21b Trace logical operations in the correct channel diff --git a/Implab/Diagnostics/Trace.cs b/Implab/Diagnostics/Trace.cs --- a/Implab/Diagnostics/Trace.cs +++ b/Implab/Diagnostics/Trace.cs @@ -29,6 +29,7 @@ namespace Implab.Diagnostics { /// Name. [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 @@ namespace Implab.Diagnostics { [Conditional("TRACE")] public static void EndLogicalOperation() { var op = TraceContext.Instance.EndLogicalOperation(); - LogChannel.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))); } /// diff --git a/Implab/Diagnostics/TraceContext.cs b/Implab/Diagnostics/TraceContext.cs --- a/Implab/Diagnostics/TraceContext.cs +++ b/Implab/Diagnostics/TraceContext.cs @@ -48,7 +48,7 @@ namespace Implab.Diagnostics { } public void StartLogicalOperation(string name) { - LogChannel.Default.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name)); + //LogChannel.Default.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name)); m_current.BeginLogicalOperation(name); }