Mercurial > pub > ImplabNet
comparison Implab/Diagnostics/ConsoleTraceListener.cs @ 133:6c49d02a9a05 v2
sync
| author | cin |
|---|---|
| date | Mon, 09 Feb 2015 00:28:13 +0300 |
| parents | 1b7ebcc52e5a |
| children | 04d4c92d0f28 |
comparison
equal
deleted
inserted
replaced
| 132:5fb2bbffdece | 133:6c49d02a9a05 |
|---|---|
| 21 protected override void WriteEntry(LogEventArgs args, EventText text, string channel) { | 21 protected override void WriteEntry(LogEventArgs args, EventText text, string channel) { |
| 22 var msg = new StringBuilder(); | 22 var msg = new StringBuilder(); |
| 23 | 23 |
| 24 for (int i = 0; i < text.indent; i++) | 24 for (int i = 0; i < text.indent; i++) |
| 25 msg.Append(" "); | 25 msg.Append(" "); |
| 26 msg.AppendFormat("[{0}]:{1}: {2}", args.ThreadId, channel, text.content); | 26 msg.AppendFormat("[{0}]: {1}", args.ThreadId, text.content); |
| 27 | 27 |
| 28 lock (_consoleLock) { | 28 lock (_consoleLock) { |
| 29 //Console.ForegroundColor = (ConsoleColor)(args.ThreadId % 15 + 1); | 29 Console.ForegroundColor = (ConsoleColor)(args.ThreadId % 15 + 1); |
| 30 Console.WriteLine(msg); | 30 Console.WriteLine(msg); |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 } | 33 } |
| 34 } | 34 } |
