##// END OF EJS Templates
Improved logging
Improved logging

File last commit:

r134:04d4c92d0f28 v2
r134:04d4c92d0f28 v2
Show More
Extensions.cs
41 lines | 1.6 KiB | text/x-csharp | CSharpLexer
cin
Improved logging
r134 namespace Implab.Diagnostics {
cin
rewritten tracing
r92 public static class Extensions {
public static IPromise<T> EndLogicalOperation<T>(this IPromise<T> promise) {
Safe.ArgumentNotNull(promise, "promise");
var op = TraceContext.Instance.DetachLogicalOperation();
cin
Promises rewritten, added improved version of AsyncQueue
r119 return promise.On(
x => {
cin
minor fixes
r109 TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.TraceInformation("promise = {0}", x);
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
},
err =>{
TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.TraceError("promise died {0}", err);
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
},
() => {
TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.TraceInformation("promise cancelled");
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
}
);
cin
rewritten tracing
r92 }
cin
minor fixes
r94
public static IPromise EndLogicalOperation(this IPromise promise) {
Safe.ArgumentNotNull(promise, "promise");
var op = TraceContext.Instance.DetachLogicalOperation();
cin
Promises rewritten, added improved version of AsyncQueue
r119 return promise.On(() => {
cin
minor fixes
r94 TraceContext.Instance.EnterLogicalOperation(op,true);
TraceLog.EndLogicalOperation();
TraceContext.Instance.Leave();
cin
Promises rewritten, added improved version of AsyncQueue
r119 }, PromiseEventType.All);
cin
minor fixes
r94 }
cin
rewritten tracing
r92 }
}