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
What can I do to stop the logs information of a client from box-python-sdk? #414
Comments
Hey @c-rei, In order to get a little more context around your problem, could you please fill out the Github issue template provided? Much appreciated! At a high level, my first thought would be to ask which client you are using? If you are setting up a client like so: auth = OAuth2(client_id='CLIENT_ID', client_secret='CLIENT_SECRET', access_token='ACCESS_TOKEN')
client = Client(auth) Then there should be no reason why you are seeing logs as logs are not turned on by default. However, the issue template would be very helpful, thank you! |
Hey carycheng, Thanks for your responses. Yes, as you guessed, I used auth = OAuth2(client_id='CLIENT_ID', client_secret='CLIENT_SECRET', ... with box python sdk 2.2.1. When I've used box python sdk 1.5.5, I don't get any logs from box python sdk. The logs likes below, 2019-04-02 10:27:12,186 - INFO �[36mGET https://api.box.com/2.0/users/me {'headers': {'Authorization': '---wVjT', |
Hey @c-rei, Did you at any point use the To fix this a good thing to try would be to revoke the current client and re-instantiate a new How this works currently is that the DevelopmentClient inherits from |
Hey @carycheng At some point I used the DevelopmentClient probably, so I tried to reset token, and re-instantiate a new Client, But I still received the logs like below with SDK 2.2.1. HTTP/1.1" 200 0 |
Hey @carycheng When I upload a big file with my application, I got a serious problem that is the huge logs for a big file go on the prompt, it truly impact my application's performance. When I use SDK ver. 1.5.5 I didn't get any logs, but when I use SDK ver. 2.x.x I got the logs from SDK. So I think the new version SDK has some modifications for client logs. I really want to stop it. |
Hey @carycheng The logs like this: |
Hey @carycheng I've known the reason of this problem.
But I don't known how to resolve this, could you give me any advice? |
Hey @c-rei, Can you try this in your application?
This should silence the SDK logging. Let us know if this helps, thanks! |
Hey @carycheng Thanks your response for me. I tried to set logging level that you told me. It silenced the SDK logging fine. Thanks for your helps. |
Glad to hear @c-rei! I'll be closing this issue for now, please feel free to reopen if this problem persists or create a new issue if you come across any other questions, thanks! |
Hi, I'm running into the same issue as @c-rei. It is fixed by adding the following line as suggested: logging.getLogger('boxsdk').setLevel(logging.CRITICAL) However, I would like to have the logging turned off without having to include this line. @carycheng you mention that the SDK remembers that the Thank you. |
Description of the Issue
// Replace this text with a description of what problem you're having.
// Please include as much detail as possible to help us troubleshoot!
// If it isn't obvious, please include how the behavior you expect differs from what actually happened.
// This is really important so we know how to start troubleshooting your issue.
Versions Used
Box Python SDK: // Replace with the version of the Python SDK you're using.
Python: // Replace with the version of Python your application is running on.
Steps to Reproduce
// Please include detailed steps to reproduce the issue you're seeing, if possible.
// If you don't have a reproducible error, please make sure that you give us as much detail
// as you can about what your application was doing when the error occurred.
// Good steps to reproduce the problem help speed up debugging for us and gets your issue resolved sooner!
Error Message, Including Traceback
// Replace with the full error output you're seeing, if applicable.
// Please include the full stack trace to help us identify where the error is happening.
The text was updated successfully, but these errors were encountered: