예제 #1
0
        public static LogFilterPipeline GetFilterPipeLine(LoggerFilterConfigurationElementCollection filterElements)
        {
            //rwlock.AcquireReaderLock(defaultLockTimeout);
            try
            {
                LogFilterPipeline pipeline = new LogFilterPipeline();

                if (filterElements != null)
                {
                    foreach (LoggerFilterConfigurationElement ele in filterElements)
                    {
                        ILogFilter filter = GetFilterFromConfig(ele);

                        if (filter != null)
                        {
                            pipeline.Add(filter);
                        }
                    }
                }

                return(pipeline);
            }
            catch (Exception ex)
            {
                throw new LogException("创建FilterPipeline时发生错误:" + ex.Message, ex);
            }
            //finally
            //{
            //    rwlock.ReleaseReaderLock();
            //}
        }
예제 #2
0
		public static LogFilterPipeline GetFilterPipeLine(LoggerFilterConfigurationElementCollection filterElements)
        {
            //rwlock.AcquireReaderLock(defaultLockTimeout);
            try
            {
                LogFilterPipeline pipeline = new LogFilterPipeline();
                
                if (filterElements != null)
                {
					foreach (LoggerFilterConfigurationElement ele in filterElements)
                    {
                        ILogFilter filter = GetFilterFromConfig(ele);

                        if (filter != null)
                            pipeline.Add(filter);
                    }
                }

                return pipeline;
            }
            catch (Exception ex)
            {
                throw new LogException("创建FilterPipeline时发生错误:" + ex.Message, ex);
            }
            //finally
            //{
            //    rwlock.ReleaseReaderLock(); 
            //}
        }