Exemple #1
0
 public static MultipleLogWriter GetInstatance()
 {
     if (_multiplyLogWriter == null)
     {
         _multiplyLogWriter = new MultipleLogWriter(new List <ILogWriter>());
     }
     return(_multiplyLogWriter);
 }
Exemple #2
0
        static void Main(string[] args)
        {
            // var clw = ConsoleLogWriter.GetInstance();
            // clw.LogInfo("Test Information message");

            //var flw = FileLogWriter.GetInstance();
            //flw.LogInfo(@"D:\log.txt");
            //flw.Dispose();

            var mlw = MultipleLogWriter.GetInstatance();

            mlw.LogInfo("sdsd");
            mlw.Dispose();
        }
Exemple #3
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();
        }