Beispiel #1
0
 public override void WriteTo(string message)
 {
     this.buffer.AppendLine(string.Format("{0}{1}", RealTimer.GetCurrentDateTime(), message));
     this.printedLinesCounter++;
     if (this.printedLinesCounter > this.maxBufferedLines)
     {
         this.Dispose();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Write the message into the log either in text mode or binary mode.
 /// </summary>
 /// <param name="message">Message to be written into the log.</param>
 public override void WriteTo(string message)
 {
     if (this.binaryLogEnabled)
     {
         this.logBinaryWriter.Write(RealTimer.GetCurrentDateTime() + message);
         this.logBinaryWriter.Flush();
     }
     else
     {
         this.logTextWriter.WriteLine(RealTimer.GetCurrentDateTime() + message);
         this.logTextWriter.Flush();
     }
 }
Beispiel #3
0
 /// <summary>
 /// Write the given message into the console.
 /// </summary>
 /// <param name="message"></param>
 public override void WriteTo(string message)
 {
     System.Console.WriteLine(RealTimer.GetCurrentDateTime() + message);
 }