New issue
Advanced search Search tips

Issue 650748 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

The webkitpy logtesting module ignores message with severity of INFO or lower.

Project Member Reported by qyears...@chromium.org, Sep 27 2016

Issue description

In the logtesting module, it appears that the logging level should be set to logging.INFO by default (https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py?l=119).

But, when trying to use this module in a unit test, I found that messages with INFO logging level are ignored.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85f3c894a68932dd3f67b61d8adefeea92132bc3

commit 85f3c894a68932dd3f67b61d8adefeea92132bc3
Author: qyearsley <qyearsley@chromium.org>
Date: Tue Sep 27 22:10:15 2016

In 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 

Review-Url: https://codereview.chromium.org/2373833002
Cr-Commit-Position: refs/heads/master@{#421356}

[modify] https://crrev.com/85f3c894a68932dd3f67b61d8adefeea92132bc3/third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py
[add] https://crrev.com/85f3c894a68932dd3f67b61d8adefeea92132bc3/third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting_unittest.py

Status: Fixed (was: Started)

Sign in to add a comment