Aspects.Logging.Loggers.ConsoleLogger.Warn C# (CSharp) Method

Warn() public method

Logs the message with warn level.
public Warn ( string message ) : void
message string The message.
return void
        public void Warn(string message)
        {
            ConsoleColor color = Console.ForegroundColor;
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(message);
            Console.ForegroundColor = color;
        }

Usage Example

Beispiel #1
0
        public void WhenCallingWarnShouldEnterWarnMethod()
        {
            ConsoleLogger logger = new ConsoleLogger();

            logger.Warn("Test String");
        }