jamesmh / coravel

Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!
https://docs.coravel.net/Installation/
MIT License
3.92k stars 257 forks source link

Turn off logging "Coravel's scheduler is behind" #391

Closed looc closed 2 months ago

looc commented 5 months ago

Hi

If there is not a way (that i can not find) to remove the message "[Coravel.Scheduling.HostedService.SchedulerHost] Coravel's scheduler is behind 1 ticks and is catching-up to the current tick." from log please add one, its filling up my logs.

I am using Serilog as logger

//Update Removing Serilog.Extensions.Logging removes message but still maby it should not be a information message

jamesmh commented 5 months ago

Agree - will look to fix this soon.

jamesmh commented 5 months ago

Available in 5.0.4

theofanis commented 2 months ago

Ouch, went looking for this on a production system to validate some skips but it was nowhere to be found!

Then I found this issue 😅.

@jamesmh, why remove this entirely and not just change the log level? Maybe Warning or Debug? This would allow the flexibility to turn it off/on based on actual needs.

Any chance this can be reconsidered?

Cheers and kudos for the splendid work on the library!

PS: @looc, since the removed log used the Informational level, you could bypass this by setting the proper Serilog log level for the Coravel namespace to Warning.

theofanis commented 2 months ago

@jamesmh kind ping about this one, any comment based on my comment above? Thank you!

jamesmh commented 2 months ago

Hey, will look into this and get back to you 👍

jamesmh commented 2 months ago

This should be available in the next few minutes via nuget 6.0.0.

Check out the docs to see how to enable it: https://docs.coravel.net/Scheduler/#logging-tick-catch-up