Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allowed for a partial override of loggers that get excluded from setup_client #831

Merged
merged 4 commits into from
Jan 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
🦉 Updates from OwlBot post-processor
  • Loading branch information
gcf-owl-bot[bot] committed Dec 15, 2023
commit 60a3bf138961cf32d4fb5243642fad1904f6e5b5
7 changes: 3 additions & 4 deletions tests/unit/handlers/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ def test_setup_logging_excludes(self):
excluded_logger = logging.getLogger(EXCLUDED_LOGGER_NAME)
self.assertNotIn(handler, excluded_logger.handlers)
self.assertFalse(excluded_logger.propagate)

def test_setup_logging_internal_loggers_no_excludes(self):
handler = _Handler(logging.INFO)
self._call_fut(handler, excludes=())
Expand All @@ -908,10 +908,10 @@ def test_setup_logging_internal_loggers_no_excludes(self):
logger = logging.getLogger(logger_name)
self.assertNotIn(handler, logger.handlers)
self.assertFalse(logger.propagate)

logger = logging.getLogger("logging")
self.assertTrue(logger.propagate)

for logger_name in EXCLUDED_LOGGER_DEFAULTS:
logger = logging.getLogger(logger_name)
self.assertTrue(logger.propagate)
Expand Down Expand Up @@ -975,7 +975,6 @@ def tearDown(self):
logging.Logger.manager = self._logger_manager



class _Handler(object):
def __init__(self, level):
self.level = level
Expand Down