public void Append(IError error) { if (error.Level >= this.ReportLevel) { // format the error according to layout string formated = ErrorFormater.Format(this.Layout, error); // print on the console Console.WriteLine(formated); this.AppendedCount++; } }
public Debugger(bool IsAsynchronous) { _textWriter = File.CreateText(filePath); _ErrorFormater = ErrorFormater.GetDefaultInstance(); if (IsAsynchronous) { //initialize queue _debuggerQueue = new DebuggerQueue(_textWriter, _ErrorFormater); _debuggerQueue.MaxTaskCount = 1; _debuggerQueue.Name = "Debugger Queue"; _debuggerQueue.Debugger = this; _debuggerQueue.Start(); //set queueInitialized to ture _queueInitialized = true; } else { _queueInitialized = false; } }
public DebuggerQueue(TextWriter textWriter) { this._ErrorFormater = ErrorFormater.GetDefaultInstance(); this._textWriter = textWriter; }
public DebuggerQueue(TextWriter textWriter, ErrorFormater errorFormater) { this._ErrorFormater = errorFormater; this._textWriter = textWriter; }