Mercurial > pub > ImplabNet
comparison Implab/Diagnostics/TextFileListener.cs @ 194:d45bdf510514 v2
working on diagnostics
author | cin |
---|---|
date | Mon, 25 Apr 2016 15:18:56 +0300 |
parents | 04d4c92d0f28 |
children | 8200ab154c8a |
comparison
equal
deleted
inserted
replaced
191:cc19dc78edb7 | 194:d45bdf510514 |
---|---|
16 | 16 |
17 public override void Write(LogEventArgs args, object entry) { | 17 public override void Write(LogEventArgs args, object entry) { |
18 var msg = new StringBuilder(); | 18 var msg = new StringBuilder(); |
19 for (int i = 0; i < args.Operation.Level; i++) | 19 for (int i = 0; i < args.Operation.Level; i++) |
20 msg.Append(" "); | 20 msg.Append(" "); |
21 msg.AppendFormat("[{0}]:{1}: {2}", args.ThreadId, args.ChannelName, entry); | 21 msg.AppendFormat("[{0}]:{1}: {2}", args.ThreadId, args.Channel, entry); |
22 | 22 |
23 lock (m_textWriter) { | 23 lock (m_textWriter) { |
24 if (!IsDisposed) { | 24 if (!IsDisposed) { |
25 // тут гарантировано еще не освобожден m_textWriter | 25 // тут гарантировано еще не освобожден m_textWriter |
26 m_textWriter.WriteLine(msg); | 26 m_textWriter.WriteLine(msg); |