Beispiel #1
0
        public Total GetTotal(TimeInterval ti)
        {
            //根据配置,选择工厂
            IAnalyseFactory IAF = AnalyseFactoryFactory.GetAnalyseFactory(ConfigManager.GetCurrentConfig());

            //获取分析器
            ILogAnalyser ila = IAF.GetLogAnalyser();

            return(ila.GetTotal(ti));
        }
Beispiel #2
0
        /// <summary>
        /// 启动
        /// </summary>
        public void Execute()
        {
            //根据配置,选择工厂
            IAnalyseFactory IAF = AnalyseFactoryFactory.GetAnalyseFactory(ConfigManager.GetCurrentConfig());

            //获取分析器
            ILogAnalyser ila = IAF.GetLogAnalyser();

            CurrentLogAnalyser = ila;
            new System.Threading.Thread(() =>
                                        ila.Analyse(ConfigManager.GetCurrentConfig())).Start();
        }
Beispiel #3
0
        public void Start()
        {
            lock (_syncRoot)
            {
                if (_isDisposed)
                {
                    Log.WarnFormat("Ignoring Start(): This analysis has already been disposed of");
                    return;
                }

                _analyser = TryCreateAnalyser();
                _task     = _scheduler.StartPeriodic(OnUpdate, TimeSpan.FromSeconds(0.5), "");
            }
        }
Beispiel #4
0
 public static void SetPathUpdate()
 {
     new System.Threading.Thread(x =>
     {
         try
         {
             ILogAnalyser ila = TaskScheduler.Instance.CurrentLogAnalyser;
             if (ila != null)
             {
                 ila.FilesTotalCount  = 0;
                 ila.FilesReadedCount = 0;
             }
             //清空缓存
             Cache.Cache.OpersList.Clear();
             ConfigManager.Init();
         }
         catch (System.Exception ex)
         {
             logger.Error(ex.Message);
         }
     }).Start();
 }