Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            var path = new WriteLogInFile(Path.Combine("."));

            LogWriter = new LogWriter(LogLevel.All, path);


            for (int i = 0; i < 100; i++)
            {
                int  taskNum = i;
                Task task    = new Task(() =>
                {
                    WriteLog("Task " + taskNum);
                });

                task.Start();
            }

            Console.ReadLine();
        }
 public LogWriter(LogLevel logLevelUpto, WriteLogInFile writeLogInFileInstant)
 {
     _logLevel = logLevelUpto;
     _writeLogInFileInstant = writeLogInFileInstant;
 }