Mercurial > pub > ImplabNet
diff Implab/Diagnostics/ConsoleTraceListener.cs @ 48:d9d794b61bb9 interactive logger
Interactive tracing
Improved working with tracing contexts
author | cin |
---|---|
date | Fri, 18 Apr 2014 12:34:45 +0400 |
parents | 7c2369f580b8 |
children | 4c0e5ef99986 |
line wrap: on
line diff
--- a/Implab/Diagnostics/ConsoleTraceListener.cs Thu Apr 17 18:49:36 2014 +0400 +++ b/Implab/Diagnostics/ConsoleTraceListener.cs Fri Apr 18 12:34:45 2014 +0400 @@ -13,17 +13,17 @@ } - public ConsoleTraceListener(bool local) - : base(local) { + public ConsoleTraceListener(bool global) + : base(global) { } - protected override void WriteEntry(TraceContext context, EventText text) { + protected override void WriteEntry(TraceContext context, EventText text, string channel) { var msg = new StringBuilder(); for (int i = 0; i < text.indent; i++) msg.Append(" "); - msg.AppendFormat("[{0}]: {1}", context.ThreadId, text.content); + msg.AppendFormat("[{0}]:{1}: {2}", context.ThreadId, channel, text.content); lock (_consoleLock) { Console.ForegroundColor = (ConsoleColor)(context.ThreadId % 15 + 1);