quartznet / quartznet

Quartz Enterprise Scheduler .NET
http://www.quartz-scheduler.net/
Apache License 2.0
6.51k stars 1.69k forks source link

Option to stop the constant logging of "Batch acquisition of 0 triggers" #2219

Closed tarockx closed 8 months ago

tarockx commented 10 months ago

Is your feature request related to a problem? Please describe. Whenever a QuartzNet scheduler is running, it constantly spams the "Batch acquisition of 0 triggers" line to the logs, as shown in the following screenshot: image

Describe the solution you'd like It would be great to have an option to disable this logging in the Quartz configuration

Describe alternatives you've considered You can configure logging to exclude the DEBUG level, but this is not ideal in my opinion, as you might actually want to log debug messages, just not the constant "Batch acquisition of 0 triggers" line which in a lot cases is pretty useless and just pollutes the logs.

lahma commented 10 months ago

Well it's called debug level logging for a reason. DEBUG level shouldn't be normal use case unless you are trying to diagnose a problem. INFO should be a good option with Quartz.

jafin commented 8 months ago

@tarockx this should be a feature of your logger. For Example with Serilog, you can set the minimum logging level per namespace. In your example Debug level for namespace Quartz.Core.QuartzScheduler.Thread

Serilog also has a Filter.ByExcluding(Matching.With ....) you could tweak to filter on a match of the log.