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
[Request] Add option to disable logger #59
Comments
You can probably do it yourself via the logging module: import logging
logging.getLogger('py-filelock.filelock').setLevel(logging.ERROR) # not sure about the logger name but you get the point |
|
We probably should add a section on this into the readme, if you make a PR for this we would be happy to review it, thanks! |
@gaborbernat I believe that now, as of 3.2.0, it should now be: logging.getLogger("filelock._api").setLevel(logging.DEBUG) I think it makes more sense to keep the logger the same name as the package, which would require changing: to: _LOGGER = logging.getLogger("filelock") How does that sound? |
Oh you're right 🙂 |
Please put in a PR we'll accept it 😊 (add a test). |
By default this package will always print to a logger, but for my use case it only ends up cluttering the logs with "released, acquired, released, acquired, etc". I'd appreciate it if you could add the option to disable the logger :)
The text was updated successfully, but these errors were encountered: