httpclient_logging.patch
httpclient_logging.patch.
Attributes
Functions
|
Set debug-level for http.client. |
Patch the print-function used in http.client to use a call to log.debug() instead. |
|
Unpatch the print-function used in http.client. |
|
Configure the http.client.HTTPConnection-class. |
|
|
Undo the configured steps. |
Module Contents
- httpclient_logging.patch.pre_patched_value
- httpclient_logging.patch.log
- httpclient_logging.patch.set_httpclient_debuglevel(debuglevel=None)
Set debug-level for http.client.
If http-debuglevel > 0, debug messages in the http.client.HTTPConnection-class will be printed to STDOUT.
- Parameters:
debuglevel (int | str | None)
- Return type:
None
- httpclient_logging.patch.patch_httpclient_print()
Patch the print-function used in http.client to use a call to log.debug() instead.
- Return type:
None
- httpclient_logging.patch.unpatch_httpclient_print()
Unpatch the print-function used in http.client.
- Return type:
None
- httpclient_logging.patch.configure()
Configure the http.client.HTTPConnection-class.
Configure this class to use the debuglevel from an environment-variable DEBUGLEVEL_HTTPCONNECTION and to use a logger instead of a print-statements to output to standard output.
- Return type:
None
- httpclient_logging.patch.undo()
Undo the configured steps.
- Return type:
None