Mercurial > pub > ImplabNet
changeset 200:71e543dbe65a v2
working version of the project
author | cin |
---|---|
date | Fri, 14 Oct 2016 04:03:10 +0300 |
parents | 43b1017ce100 |
children | d7cd7a83189a |
files | Implab/Diagnostics/TraceContext.cs Implab/Diagnostics/TraceLog.cs |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Implab/Diagnostics/TraceContext.cs Fri Oct 14 03:33:17 2016 +0300 +++ b/Implab/Diagnostics/TraceContext.cs Fri Oct 14 04:03:10 2016 +0300 @@ -48,7 +48,7 @@ } public void StartLogicalOperation(string name) { - LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceEventType.OperationStarted, name)); + LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceContext.Instance.CurrentOperation, TraceEventType.OperationStarted, name)); m_current.BeginLogicalOperation(name); }
--- a/Implab/Diagnostics/TraceLog.cs Fri Oct 14 03:33:17 2016 +0300 +++ b/Implab/Diagnostics/TraceLog.cs Fri Oct 14 04:03:10 2016 +0300 @@ -34,7 +34,7 @@ [Conditional("TRACE")] public static void EndLogicalOperation() { var op = TraceContext.Instance.EndLogicalOperation(); - LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(TraceEventType.OperationCompleted, String.Format("-{0} : {1}ms",op.Name, op.Duration))); + LogChannel<TraceEvent>.Default.LogEvent(new TraceEvent(op, TraceEventType.OperationCompleted, String.Format("-{0} : {1}ms",op.Name, op.Duration))); } /// <summary> @@ -44,7 +44,7 @@ /// <param name="arguments">Arguments.</param> [Conditional("TRACE")] public static void TraceInformation(string format, params object[] arguments) { - LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Information, format, arguments)); + LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceContext.Instance.CurrentOperation, TraceEventType.Information, format, arguments)); } /// <summary> @@ -54,12 +54,12 @@ /// <param name="arguments">Arguments.</param> [Conditional("TRACE")] public static void TraceWarning(string format, params object[] arguments) { - LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceEventType.Warning, format, arguments)); + LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceContext.Instance.CurrentOperation, 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)); + LogChannel<TraceEvent>.Default.LogEvent(TraceEvent.Create(TraceContext.Instance.CurrentOperation, TraceEventType.Error, format, arguments)); } [Conditional("TRACE")]