kubernetes-client / kubernetes-client/python
creating Configuration disables all HTTP debug logging
- Dominant language
- Python
- Stars
- 7.7k
- Forks
- 3.5k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 18
Description
Debug mode is disabled automatically in the constructor.
https://github.com/kubernetes-client/python/blob/6b01c95e1673c0787d3d688b361bfd995d62dd98/kubernetes/client/configuration.py#L126
Doing so disables HTTP debug logging for the whole application.
https://github.com/kubernetes-client/python/blob/6b01c95e1673c0787d3d688b361bfd995d62dd98/kubernetes/client/configuration.py#L265-L270
This means that even HTTP requests that have nothing to do with k8s won't be logged anymore. This is neither expected or desirable. Enabling/disabling debug logging should not tamper with the global `HTTPConnection.debuglevel` setting in any way.
Furthermore, it looks like two separate `Configuration`s will still share their loggers. Consequently, you cannot really have one that has debug disabled and another with debug enabled. Thus it shouldn't be presented as an instance field.
Contributor guide
Assessment
This issue has not been assessed yet.