fix: change rate-limit log level from info to debug#7117
fix: change rate-limit log level from info to debug#7117iegl3 wants to merge 2 commits intolouislam:masterfrom
Conversation
|
Hello and thanks for lending a paw to Uptime Kuma! 🐻👋 |
louislam
left a comment
There was a problem hiding this comment.
We have the same pr 2 years ago, see the review here.
| async pass(callback, num = 1) { | ||
| const remainingRequests = await this.removeTokens(num); | ||
| log.info("rate-limit", "remaining requests: " + remainingRequests); | ||
| log.debug("rate-limit", "remaining requests: " + remainingRequests); |
There was a problem hiding this comment.
Even though this might be annoying to you, please fix this properly.
If very few requests are remaining, this is a warning, else debug.
|
@mahdirajaee feel free to contribute the proper fix for this if this is annoying you. This PR seems a bit stuck. |
Summary
In this pull request, the following changes are made:
log.info()tolog.debug()for the rate-limit "remaining requests" message inserver/rate-limiter.js. This message logs on every single request, which floods the log output unnecessarily. Debug level keeps it available when needed but hidden by default.Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.
Screenshots for Visual Changes
UPDOWN