##// END OF EJS Templates
added multithreading support to Disposable class
added multithreading support to Disposable class

File last commit:

r92:4c0e5ef99986 v2
r100:673947ce458a v2
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);
}
}
}