Quartz.NET过滤INFO消息

时间:2016-05-13 13:38:05

标签: c# quartz.net

我在我的一个应用程序中使用Quartz.NET,配置为使用log4net进行日志记录。到目前为止一切顺利,一切都按预期工作。

然而,有一件事困扰着我。当我使用INFO作为日志级别时,有没有办法从日志中过滤掉Quartz.NET消息?

典型的日志文件如下所示:

2016-05-13 16:30:32,608 - Application start
2016-05-13 16:30:32,646 - [Quartz.Impl.StdSchedulerFactory] - INFO - Using default implementation for object serializer
2016-05-13 16:30:32,677 - [Quartz.Impl.StdSchedulerFactory] - INFO - Using default implementation for ThreadExecutor
2016-05-13 16:30:32,677 - [Quartz.Core.SchedulerSignalerImpl] - INFO - Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl
2016-05-13 16:30:32,677 - [Quartz.Core.QuartzScheduler] - INFO - Quartz Scheduler v.2.3.3.0 created.
2016-05-13 16:30:32,677 - [Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin] - INFO - Registering Quartz Job Initialization Plug-in.
2016-05-13 16:30:32,677 - [Quartz.Simpl.RAMJobStore] - INFO - RAMJobStore initialized.
2016-05-13 16:30:32,692 - [Quartz.Core.QuartzScheduler] - INFO - Scheduler meta-data: Quartz Scheduler (v2.3.3.0) 'ArchiveAppScheduler' with instanceId 'ArchiveApp'
  Scheduler class: 'Quartz.Core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'Quartz.Simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'Quartz.Simpl.RAMJobStore' - which does not support persistence. and is not clustered.

2016-05-13 16:30:32,692 - [Quartz.Impl.StdSchedulerFactory] - INFO - Quartz scheduler 'ArchiveAppScheduler' initialized
2016-05-13 16:30:32,692 - [Quartz.Impl.StdSchedulerFactory] - INFO - Quartz scheduler version: 2.3.3.0
2016-05-13 16:30:32,692 - [Quartz.Xml.XMLSchedulingDataProcessor] - INFO - Parsing XML file: quartz_jobs.xml with systemId: quartz_jobs.xml
2016-05-13 16:30:32,846 - [Quartz.Xml.XMLSchedulingDataProcessor] - INFO - Adding 1 jobs, 1 triggers.
2016-05-13 16:30:32,846 - [Quartz.Xml.XMLSchedulingDataProcessor] - INFO - Adding job: MainJob.ArchiveDB
2016-05-13 16:30:32,862 - [Quartz.Core.QuartzScheduler] - INFO - Scheduler ArchiveAppScheduler_$_ArchiveApp started.
2016-05-13 16:30:32,878 - [ArchiveApp.ArchiveDB] - INFO - Archiving process started
2016-05-13 16:30:32,878 - [ArchiveApp.Helpers] - INFO - Reading SyncRepositoryServerName setting

有没有办法过滤掉所有[Quartz。#######]消息?

1 个答案:

答案 0 :(得分:1)

尝试添加

 <logger name="Quartz">
    <level value="OFF" />
 </logger>