##// END OF EJS Templates
Trace logical operations in the correct channel
cin -
r218:babe55c34931 v2
parent child
Show More
@@ -29,6 +29,7 namespace Implab.Diagnostics {
29 29 /// <param name="name">Name.</param>
30 30 [Conditional("TRACE")]
31 31 public static void StartLogicalOperation(string name) {
32 Channel.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name));
32 33 TraceContext.Instance.StartLogicalOperation(name);
33 34 }
34 35
@@ -38,7 +39,7 namespace Implab.Diagnostics {
38 39 [Conditional("TRACE")]
39 40 public static void EndLogicalOperation() {
40 41 var op = TraceContext.Instance.EndLogicalOperation();
41 LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(op, TraceEventType.OperationCompleted, String.Format("-{0} : {1}ms", op.Name, op.Duration)));
42 Channel.LogEvent(new TraceEvent(op, TraceEventType.OperationCompleted, String.Format("-{0} : {1}ms", op.Name, op.Duration)));
42 43 }
43 44
44 45 /// <summary>
@@ -48,7 +48,7 namespace Implab.Diagnostics {
48 48 }
49 49
50 50 public void StartLogicalOperation(string name) {
51 LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name));
51 //LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name));
52 52 m_current.BeginLogicalOperation(name);
53 53 }
54 54
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved
author

ok, latest stable version should be in default

You need to be logged in to leave comments. Login now