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(); } }
/// <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(); } }
/// <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); }