Exemplo n.º 1
0
 public override void Log(LogEntry entry)
 {
     if (entry.Level <= HighestLevel)
         if (this.UseCustomFormat)
             Console.WriteLine (entry.ToFormatString (this.CustomFormat));
         else
             Console.WriteLine (entry.ToString ());
 }
Exemplo n.º 2
0
        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) });
            }
        }
Exemplo n.º 3
0
 public abstract void Log(LogEntry entry);
Exemplo n.º 4
0
 public void Enqueue(LogEntry entry)
 {
     lock (_lock)
         cache.Enqueue (entry);
 }
Exemplo n.º 5
0
        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 ();
        }