Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Periodic log using time instead of count #663

@darbitman

Description

@darbitman

The macro LOG_EVERY_N and its siblings use a counter to display a message every Nth times it gets called. This is great for limiting logs, but in systems where the log calls are not only infrequent but also varies it would be beneficial to log every time period T instead. When the log calls are very frequent this will rate limit to 1 log entry per time T, and when they become infrequent, it will turn into at most 1 log entry per time T.

I plan on adding this feature.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions