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

Provide information about which specific rate limits were counted #185

Open
zhanghao0809 opened this issue Jul 25, 2019 · 2 comments
Open

Comments

@zhanghao0809
Copy link

I use multiple decorators in my class before method.I want to write the detail to the log file when the request is blocked,Like "xxx IP is blocked" or "xx user is blocked " .But I have no idea how to know which decorator the API triggers in the method。

@jsocol
Copy link
Owner

jsocol commented Aug 2, 2019

Right now, it's not possible. I'm going to rename this issue to capture the request. (It's come up before, so I actually thought there was one already.)

@jsocol jsocol changed the title how to log the detail when I use multiple decorators Provide information about which specific rate limits were counted Aug 2, 2019
@jsocol jsocol added this to the 4.0 milestone Jan 31, 2021
@jsocol jsocol modified the milestones: 4.0, 4.1 Dec 3, 2022
@lomadapraveenreddy
Copy link

Hi @jsocol, I created a pr for this issue.
I implemented it like this, user sends an object of RatelimitLogger class which takes name of the logger defined in settings, level and the format of the message to log.
When rate is limited and logger object is sent to the ratelimit decorator then we log them.

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

No branches or pull requests

3 participants