Example #1
0
 public static ConsoleLogWriter GetInstance()
 {
     if (_consoleLogWriter == null)
     {
         _consoleLogWriter = new ConsoleLogWriter();
     }
     return(_consoleLogWriter);
 }
Example #2
0
        static void Main(string[] args)
        {
            MultipeLogWriter multipeLogWriter = MultipeLogWriter.GetInstance(
                new List <ILogWriter> {
                ConsoleLogWriter.GetInstance(), FileLogWriter.GetInstance()
            });

            multipeLogWriter.LogError("Ошибка");
            multipeLogWriter.LogWarning("Внимание");
            multipeLogWriter.LogInfo("Информация");
            Console.ReadKey();
        }