예제 #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 ());
 }
예제 #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) });
            }
        }
예제 #3
0
 public abstract void Log(LogEntry entry);
예제 #4
0
 public void Enqueue(LogEntry entry)
 {
     lock (_lock)
         cache.Enqueue (entry);
 }
예제 #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 ();
        }