public override void Log(LogEntry entry) { if (entry.Level <= HighestLevel) if (this.UseCustomFormat) Console.WriteLine (entry.ToFormatString (this.CustomFormat)); else Console.WriteLine (entry.ToString ()); }
public override void Log(LogEntry entry) { checkFile (); if (entry.Level <= HighestLevel) { if (this.UseCustomFormat) File.AppendAllLines (this.Filepath, new string[]{ entry.ToString () }); else File.AppendAllLines (this.Filepath, new string[]{ entry.ToFormatString (this.CustomFormat) }); } }
public abstract void Log(LogEntry entry);
public void Enqueue(LogEntry entry) { lock (_lock) cache.Enqueue (entry); }
public void Log(LogEntry entry) { foreach (LogTarget t in targets.Values) if (t.LogImmediate) t.Log (entry); cache.Enqueue (entry); if (this.running && this.active && (!this.settings.UseCache ||cache.NeedsStoring || (entry.Level > this.settings.LowestCachedLevel))) doLog.Set (); }