##// END OF EJS Templates
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.

File last commit:

r195:ea485487a424 v2
r196:40d7fed4a09e default
Show More
TraceLog.cs
50 lines | 2.0 KiB | text/x-csharp | CSharpLexer
cin
improved log concept
r36 using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Implab.Diagnostics {
/// <summary>
cin
improved tracing...
r40 /// Класс для публикации событий выполнения программы, события публикуются через <see cref="LogChannel{TraceEvent}"/>.
/// Журнал трассировки отражает логический ход выполнения программы и существует всегда, поскольку тесно связан с
/// контекстом трассировки.
cin
improved log concept
r36 /// </summary>
public static class TraceLog {
[Conditional("TRACE")]
public static void StartLogicalOperation() {
cin
rewritten tracing
r92 TraceContext.Instance.StartLogicalOperation();
cin
improved log concept
r36 }
[Conditional("TRACE")]
public static void StartLogicalOperation(string name) {
cin
rewritten tracing
r92 TraceContext.Instance.StartLogicalOperation(name);
cin
improved log concept
r36 }
[Conditional("TRACE")]
public static void EndLogicalOperation() {
cin
rewritten tracing
r92 TraceContext.Instance.EndLogicalOperation();
cin
improved trace system
r52 }
[Conditional("TRACE")]
cin
improved log concept
r36 public static void TraceInformation(string format, params object[] arguments) {
LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Information, format, arguments));
}
[Conditional("TRACE")]
public static void TraceWarning(string format, params object[] arguments) {
LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Warning, format, arguments));
}
[Conditional("TRACE")]
public static void TraceError(string format, params object[] arguments) {
LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Error, format, arguments));
}
[Conditional("TRACE")]
public static void TraceError(Exception err) {
TraceError("{0}", err);
}
}
}