using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IPA.Logging.Printers { /// /// A colorless version of , that indiscriminantly prints to standard out. /// public class ColorlessConsolePrinter : LogPrinter { /// /// A filter for this specific printer. /// public override Logger.LogLevel Filter { get; set; } /// /// Prints an entry to standard out. /// /// the of the message /// the the message was recorded at /// the name of the log that sent the message /// the message to print public override void Print(Logger.Level level, DateTime time, string logName, string message) { if (((byte)level & (byte)StandardLogger.PrintFilter) == 0) return; foreach (var line in message.Split(new[] { "\n", Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) Console.WriteLine(Logger.LogFormat, line, logName, time, level.ToString().ToUpper()); } } }