##// END OF EJS Templates
working version of diagnostics logging
cin -
r37:c2c043520724 diagnostics
parent child
Show More
@@ -20,5 +20,11 namespace Implab.Diagnostics {
20 20 if (t!= null)
21 21 t(TraceContext.Current,new ValueEventArgs<TEvent>(data));
22 22 }
23
24 public void LogEvent(TraceContext context,TEvent data) {
25 var t = Events;
26 if (t != null)
27 t(context, new ValueEventArgs<TEvent>(data));
28 }
23 29 }
24 30 }
@@ -34,7 +34,7 namespace Implab.Diagnostics {
34 34 m_traceBound = context.CurrentOperation;
35 35 m_threadId = Thread.CurrentThread.ManagedThreadId;
36 36
37 LogEvent(TraceEventType.Transfer, String.Empty);
37 LogEvent(TraceEventType.Transfer, "FORK {0}", context.ThreadId);
38 38 }
39 39
40 40 TraceContext() {
@@ -91,7 +91,7 namespace Implab.Diagnostics {
91 91 }
92 92
93 93 void LogEvent(TraceEventType type, string format, params object[] args) {
94 LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(type, format, args));
94 LogChannel<TraceEvent>.Default.LogEvent(this, TraceEvent.Create(type, format, args));
95 95 }
96 96 }
97 97 }
General Comments 0
You need to be logged in to leave comments. Login now