Пример #1
0
        public void Log(NumergeLogLevel level, string message)
        {
            var oldColor = Console.ForegroundColor;

            Console.ForegroundColor = level == NumergeLogLevel.Info
                ? oldColor
                : level == NumergeLogLevel.Warning
                    ? ConsoleColor.Yellow
                    : ConsoleColor.Red;

            Console.WriteLine(message);
            Console.ForegroundColor = oldColor;
        }
Пример #2
0
 public void Log(NumergeLogLevel level, string message)
 {
     if (level == NumergeLogLevel.Error)
     {
         Logger.Error(message);
     }
     else if (level == NumergeLogLevel.Warning)
     {
         Logger.Warn(message);
     }
     else
     {
         Logger.Info(message);
     }
 }