That would be exactly right. I would create a TimeFilter that is very much like the DynamicThresholdFilter but instead of using an MDC key it woul use a time frame.
This would be interesting as it could be implemented to either check the time in the event for every request or it could create a background thread that changes the log level to filter on based on the times. I’d probably opt for the second approach. Ralph > On May 3, 2021, at 5:33 AM, Gary Gregory <garydgreg...@gmail.com> wrote: > > I just had an interesting request: Debug logging produces a ton of output > and what is being debugged only happens in a specific time window. How can > we configure debug logging to enable in a time window...? > > Any thoughts on this? Can a TimeFilter be configured to only filter debug > events? > > Gary