Skip to content

creating Configuration disables all HTTP debug logging #1530

Open
@rittneje

Description

@rittneje

Debug mode is disabled automatically in the constructor.

self.debug = False

Doing so disables HTTP debug logging for the whole application.

# if debug status is False, turn off debug logging,
# setting log level to default `logging.WARNING`
for _, logger in six.iteritems(self.logger):
logger.setLevel(logging.WARNING)
# turn off httplib debug
httplib.HTTPConnection.debuglevel = 0

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 Configurations 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.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions