##// END OF EJS Templates
working version of AsyncQueue and batch operations...
working version of AsyncQueue and batch operations tests

File last commit:

r109:1b7ebcc52e5a v2
r121:62d2f1e98c4e v2
Show More
ConsoleTraceListener.cs
34 lines | 943 B | text/x-csharp | CSharpLexer
/ Implab / Diagnostics / ConsoleTraceListener.cs
cin
improved log concept
r36 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Implab.Diagnostics {
cin
improved tracing...
r40 public class ConsoleTraceListener: TextListenerBase {
cin
improved log concept
r36
static readonly object _consoleLock = new object();
cin
improved tracing, TextListenerBase can be bound to logical operation scope.
r43 public ConsoleTraceListener()
: base(true) {
}
cin
Interactive tracing...
r48 public ConsoleTraceListener(bool global)
: base(global) {
cin
improved tracing, TextListenerBase can be bound to logical operation scope.
r43
}
cin
rewritten tracing
r92 protected override void WriteEntry(LogEventArgs args, EventText text, string channel) {
cin
improved tracing...
r40 var msg = new StringBuilder();
cin
improved log concept
r36
cin
improved tracing...
r40 for (int i = 0; i < text.indent; i++)
cin
improved log concept
r36 msg.Append(" ");
cin
rewritten tracing
r92 msg.AppendFormat("[{0}]:{1}: {2}", args.ThreadId, channel, text.content);
cin
improved log concept
r36
lock (_consoleLock) {
cin
minor fixes
r109 //Console.ForegroundColor = (ConsoleColor)(args.ThreadId % 15 + 1);
cin
rewritten tracing
r92 Console.WriteLine(msg);
cin
improved log concept
r36 }
}
}
}