public LoggingColors() { Debug = ColorSetting.Foreground(ConsoleColor.Gray); Info = ColorSetting.Foreground(ConsoleColor.Green); Warn = ColorSetting.Foreground(ConsoleColor.Yellow); Error = ColorSetting.Foreground(ConsoleColor.Red); }
public ConsoleColorContext(ColorSetting colorSetting) { if (colorSetting.BackgroundColor.HasValue) { Console.BackgroundColor = colorSetting.BackgroundColor.Value; } Console.ForegroundColor = colorSetting.ForegroundColor; }
void Log(LogLevel level, string message, ColorSetting colorSetting, params object[] objs) { if (factory.colored) { using (colorSetting.Enter()) { Write(level, message, objs); } } else { Write(level, message, objs); } }
void Log(LogLevel level, string message, ColorSetting colorSetting, params object[] objs) { if (_factory._colored) { using (colorSetting.Enter()) { Write(level, message, objs); } } else { Write(level, message, objs); } }