Beispiel #1
0
 protected AppenderBase(LogConfiguration setting)
 {
   this.Setting = setting;
   Queue = new ConcurrentQueue<LogContext>();
   worker = new Thread(FlushLog);
   worker.IsBackground = true;
   worker.Start();
 }
Beispiel #2
0
 public static void Init(LogConfiguration setting)
 {
   LOGGERS = new List<Logger>();
   SETTING = setting;
   APPENDERS = new List<IAppender>() { 
   new FileAppender(SETTING),
   new ConsoleAppender(SETTING)
   };
   Task.Factory.StartNew(() =>
   {
     CleanLog();
   });
 }
Beispiel #3
0
 public ConsoleAppender(LogConfiguration setting)
   : base(setting)
 {
 }           
Beispiel #4
0
 static LogFactory()
 {
   SETTING = new LogConfiguration(Path.Combine(Application.StartupPath, configurationFile ?? "log.conf"));
   LogWorker.Init(SETTING);
   LOG = LogWorker.GetLog("log");
 }