-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add rate-limiting and throttling support for log messages #616
Comments
Hey, we have the LOG_LIMIT macros have you tried those? For example quill/examples/console_logging.cpp Line 58 in 62450f9
list of all available macros https://quillcpp.readthedocs.io/en/latest/logging_macros.html let me know if that helps |
Thank you for recommending these macros - they've been helpful for implementing time-based rate limiting. Would it be possible to also add a counter-based macro? Additionally, for the time-based limiting feature, it would be useful to have functionality to retrieve the number of occurrences within a specified time window. |
The count-based approach should be straightforward to add if it’s as simple as: LOG_EVERY_N(logger, 1000, "Processing item {}", item_id); However, I’m not certain how easy it would be to retrieve the count within the timing macros while keeping the API simple. If you have any ideas, please feel free to share |
|
Is your feature request related to a problem? Please describe.
When debugging or monitoring applications, there are scenarios where certain events or log messages occur very frequently (e.g., in tight loops or high-frequency operations), leading to log file bloat and reduced visibility of other important messages. Currently, Quill lacks a built-in mechanism to rate-limit or throttle specific log messages, either based on occurrence count or time intervals. This forces developers to implement custom solutions outside the logging framework.
Describe the solution you'd like
Add a rate-limiting feature to Quill that allows developers to specify logging frequency constraints in two ways:
Additional context
Similar features exist in other logging frameworks:
The text was updated successfully, but these errors were encountered: