Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic log using time instead of count #663

Closed
darbitman opened this issue May 29, 2021 · 0 comments · Fixed by #669
Closed

Periodic log using time instead of count #663

darbitman opened this issue May 29, 2021 · 0 comments · Fixed by #669
Assignees
Milestone

Comments

@darbitman
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants