Exemplo n.º 1
0
        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.");
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 7
0
 public void SetNextLogger(AbstractLogger NextLogger)
 {
     this.NextLogger = NextLogger;
 }
Exemplo n.º 8
0
 public void setNextLogger(AbstractLogger nextLogger)
 {
     this.nextLogger = nextLogger;
 }