comparison Implab/Diagnostics/TextFileListener.cs @ 43:7c2369f580b8

improved tracing, TextListenerBase can be bound to logical operation scope.
author cin
date Wed, 16 Apr 2014 10:12:56 +0400
parents fe33f4e02ad5
children e5ec543feee3
comparison
equal deleted inserted replaced
42:3ba6778ed336 43:7c2369f580b8
6 6
7 namespace Implab.Diagnostics { 7 namespace Implab.Diagnostics {
8 public class TextFileListener: TextListenerBase { 8 public class TextFileListener: TextListenerBase {
9 readonly TextWriter m_textWriter; 9 readonly TextWriter m_textWriter;
10 10
11 public TextFileListener(string fileName) { 11 public TextFileListener(string fileName) : base(true) {
12 m_textWriter = File.CreateText(fileName); 12 m_textWriter = File.CreateText(fileName);
13 13
14 m_textWriter.WriteLine("LOG {0}", DateTime.Now); 14 m_textWriter.WriteLine("LOG {0}", DateTime.Now);
15 Register(this); 15 Register(this);
16 } 16 }