Closed
Description
Describe the feature
Referencing this line. Please change it to using logging.NullHandler()
instead of a custom handler. Because boto3
(as well as botocore
and s3transfer
) creates its own NullHandler
, I as a developer can't iterate through the handlers and do a simple isinstance(handler, logging.NullHandler)
.
Use Case
Need to pull the class name and hope boto3 stays using the name NullHandler
:
```python
loggers = []
for logger_name, logger_instance in logging.root.manager.loggerDict.items():
if hasattr(logger_instance, "handlers"):
for handler in logger_instance.handlers:
if handler.__class__.__name__ != "NullHandler": # isinstance is preferred here
loggers.append(logger_name)
break
Proposed Solution
logging.getLogger('boto3').addHandler(logging.NullHandler())
And remove the custom class. Or, bare minimum, at least inherit from pythons NullHandler instead of from Handler.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
SDK version used
latest
Environment details (OS name and version, etc.)
not-needed