Esempio n. 1
0
 public static ConsoleLogWriter GetSingle()
 {
     if (single == null)
     {
         single = new ConsoleLogWriter();
     }
     return(single);
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ConsoleLogWriter demo = ConsoleLogWriter.GetSingle();

            var fileLogger = new FileLogWriter();

            using (var logger = new MultipleLogWriter(demo, fileLogger))
            {
                logger.LogInfo("Test information message");
                logger.LogWarning("Test warning message");
                logger.LogError("Test error message");
            }
        }