public static MultipeLogWriter GetInstance(List <ILogWriter> _logWriters)
 {
     if (_multipeLogWriter == null)
     {
         _multipeLogWriter = new MultipeLogWriter(_logWriters);
     }
     return(_multipeLogWriter);
 }
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();
        }