public static ConsoleLogWriter GetInstance()
        {
            if (_consoleLogWriter == null)
            {
                _consoleLogWriter = new ConsoleLogWriter();
            }

            return(_consoleLogWriter);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var clw = new ConsoleLogWriter();
            //clw.LogInfo("Test Information message");

            var flw = new FileLogWriter(@"C:\Users\jimac\Desktop\log.txt");
            //flw.LogInfo("Test information message");

            var mlw = new MultipleLogWriter(new List <ILogWriter> {
                clw, flw
            });

            clw.LogInfo("Test info mess");
            flw.LogInfo("Test info mess");
            mlw.LogInfo("testsdasd");
            mlw.Dispose();
            flw.Dispose();
        }