示例#1
0
        static void Main(string[] args)
        {
            AbstractLogger logger = GetChainOfLoggers();

            logger.LogMessage(AbstractLogger.LOG_LEVEL_INFO, "Info Log");
            logger.LogMessage(AbstractLogger.LOG_LEVEL_DEBUG, "Debug Log");
            logger.LogMessage(AbstractLogger.LOG_LEVEL_ERROR, "Error Log");
        }
示例#2
0
        static void Main(string[] args)
        {
            AbstractLogger logger = AbstractLogger.Logger;

            logger.LogMessage(AbstractLogger.INFO,
                              "This is an information.");

            logger.LogMessage(AbstractLogger.DEBUG,
                              "This is an debug level information.");

            logger.LogMessage(AbstractLogger.ERROR,
                              "This is an error information.");
        }
示例#3
0
 public void SetNextLogger(AbstractLogger nextLogger)
 {
     NextLogger = nextLogger;
 }