Default handlers log too much and there's no way to disable them through the library API
See original GitHub issueI’m trying to use backoff
with a login function that connects to an external server. The code looks something like this.
@backoff.on_exception(backoff.expo, FailedConnection)
def login(username, password):
# stuff
When on_backoff
triggers, the default handler is invoked which logs the signature which includes the password in this case.
It’d be great to have a way to disable/override the default handlers to provide my own logging behavior.
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
java.util.logging - How can I disable the default console ...
I want to use two handlers. A file handler and my own console handler. Both of my handlers work fine. My logging is...
Read more >logging.handlers — Logging handlers — Python 3.11.1 ...
The default implementation calls the 'namer' attribute of the handler, if it's callable, passing the default name to it. If the attribute isn't...
Read more >Python Logging Guide - Best Practices and Hands-on Examples
Log data is often a log message, which is a string, along with some extra data to be logged. Often, the logging API...
Read more >Troubleshoot form issues in model-driven apps - Microsoft Learn
Not all control state change attempts are successful. For a control disabled by form XML, you can enable it through client API in...
Read more >Python Logging Basics - The Ultimate Guide To Logging
The default, which is there for backward compatibility only, will disable any loggers created by modules. This can break many modules, so use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@duckpunch sorry merging this got delayed because I was trying to work out the best way to accommodate the competing goal of making the original behavior available in a convenient way via the API. That said, I’m actually inclined to merge this and release it as is as backoff==1.3.2 since I consider this potential for unwanted information leakage to be a security issue.
@luckydonald I have a WIP for supporting the original logging behavior out of the box via the API, but it involves some subtle changes in the contract of the event handler callbacks. As such, I’d probably end up releasing it as 1.4 but I’m not quite ready for that. In the meantime, you can either use the user-space implementation I suggested above, or freeze backoff at 1.3.1.
Created related issue https://github.com/litl/backoff/issues/21