Skip to content

[LOGGING] Disabling base logger propagation breaks logs #15149

@yemreck

Description

@yemreck

googleapis/google-auth-library-python#1678

While checking for is logging enabled,

https://github.com/googleapis/google-auth-library-python/blob/56b4d3b3bfd6f935411130c8828cdeea90aa69f1/google/auth/_helpers.py#L381-L382

these lines disables root level propagation if base logger is not configured.

However this breaks all children loggers, causing them to be NOTSET.

This leads logger.isEnabledFor(logging.DEBUG) to return True on not configured loggers. Normally they would propagate to WARNING level.

This bug causes unnecessary costly json parsing on response_log.

Environment details

  • OS:
  • Python version:
  • pip version:
  • google-auth version: >=2.40.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions