static void Main() { AbstractLogger loggerChain = getChainOfLoggers(); loggerChain.LogMessage(AbstractLogger.INFO, "This is an information."); loggerChain.LogMessage(AbstractLogger.DEBUG, "This is an debug level information."); loggerChain.LogMessage(AbstractLogger.ERROR, "This is an error information."); }
public static void Demo() { AbstractLogger lc = GetChainOfLoggers(); lc.LogMessage(AbstractLogger.INFO, "This is an information"); lc.LogMessage(AbstractLogger.DEBUG, "This is an debug information"); lc.LogMessage(AbstractLogger.ERROR, "This is an error information"); Console.ReadLine(); }
static void Main(string[] args) { AbstractLogger loggerChain = getChainOfLoggers(); loggerChain.logMessage(AbstractLogger.INFO, "This is an information."); loggerChain.logMessage(AbstractLogger.DEBUG, "This is a debug level information."); loggerChain.logMessage(AbstractLogger.ERROR, "This is an error information."); Console.ReadKey(); }
public static void Main(string[] args) { AbstractLogger logger = CreateChain(); logger.Log(AbstractLogger.LogLevel.Debug, "Das ist eine Debugnachricht"); Console.WriteLine("---------------------------------"); logger.Log(AbstractLogger.LogLevel.Error, "ACHTUNG!!!! Es ist ein Fehler aufgetreten! Launch the Cyber-nuke"); Console.WriteLine("---------------------------------"); logger.Log(AbstractLogger.LogLevel.Info, "Das ist eine infomative Informationsnachricht!"); Console.ReadLine(); }
public DebugLogger(LogLevel level, AbstractLogger nextLogger = null) : base(level, nextLogger) { Level = level; NextLogger = nextLogger; }
public AbstractLogger(LogLevel level, AbstractLogger nextLogger = null) { Level = level; NextLogger = nextLogger; }
public void SetNextLogger(AbstractLogger NextLogger) { this.NextLogger = NextLogger; }
public void setNextLogger(AbstractLogger nextLogger) { this.nextLogger = nextLogger; }