Chromium Code Reviews
DescriptionIn the logtesting support module, fix the setting of logging level.
Background:
The logtesting.LoggingTestCase class sets up a logging handler with a
particular level, and attaches it to the root logger.
When messages are logged in code under tests in unit tests, the log
messages bubble up to the root logger and then are handled by this
attached handler.
Each logger and handler throws away messages below its own logging level,
and the default logging level for the root logger is logging.WARNING.
Thus the handler would accept INFO messages by default, but the handler
never sees those messages because the root logger throws them away.
This CL just changes logtesting to set the log level of the root logger
to the same level as the handler.
This CL also adds a unit test for the logtesting module.
BUG=650748
Committed: https://crrev.com/85f3c894a68932dd3f67b61d8adefeea92132bc3
Cr-Commit-Position: refs/heads/master@{#421356}
Patch Set 1 #
Messages
Total messages: 13 (8 generated)
|
||||||||||||||||||||||||||||