Aspects.Logging.Loggers.ConsoleLogger.Fatal C# (CSharp) Метод

Fatal() публичный Метод

Logs the message and exception with fatal level.
public Fatal ( string message, Exception exception ) : void
message string The message.
exception System.Exception The exception.
Результат void
        public void Fatal(string message, Exception exception)
        {
            ConsoleColor color = Console.ForegroundColor;
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(message);
            Console.WriteLine(exception);
            Console.ForegroundColor = color;
        }
    }

Usage Example

Пример #1
0
        public void WhenCallingFatalShouldEnterFatalMethod()
        {
            ConsoleLogger logger = new ConsoleLogger();

            logger.Fatal("Test String", new Exception());
        }