Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Issue 2188623002: Change logging statements to not use the "%" operator. (Closed)

Created:
4 years, 4 months ago by qyearsley
Modified:
4 years, 4 months ago
Reviewers:
Dirk Pranke, wkorman
CC:
blink-reviews, blink-reviews-style_chromium.org, blink-reviews-w3ctests_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, Dirk Pranke, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change logging statements to not use the "%" operator. AKA "lazy logging". This slightly improves readability because it decreases the number of parentheses. It also saves a tiny amount of time constructing the interpolated strings for debug statements when the logging level would make it so that debug logs are not printed. This fixes the logging-not-lazy warnings which were just enabled in http://crrev.com/2120083002. This CL also changes the few instances of _log.warn to _log.warning for consistency. Note, most of the changes were done with sed: s/\.\(debug\|warning\|warn\|info\|error\|critical\)(\(.*\) % (\(.*\)))/\.\1(\2, \3)/ s/\.\(debug\|warning\|warn\|info\|error\|critical\)(\(.*\) % \(.*\))/\.\1(\2, \3)/ BUG=598897 Committed: https://crrev.com/0c097eab9977221aff1c8155c9f907fdb529dd92 Cr-Commit-Position: refs/heads/master@{#408745}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -217 lines) Patch
M third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/diff_parser.py View 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/detection.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/message_pool.py View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/net/networktransaction.py View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld.py View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive.py View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/system/user.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/system/user_mock.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/system/workspace.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/bisect_test_ordering.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_multipart.py View 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_win.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py View 6 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py View 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py View 5 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py View 11 chunks +19 lines, -19 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py View 12 chunks +17 lines, -17 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver.py View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/server_base.py View 8 chunks +25 lines, -25 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest.py View 3 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py View 9 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/style/checker.py View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/style/filereader.py View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/style/main.py View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/style/patchreader.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commit_announcer.py View 3 chunks +10 lines, -10 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/command.py View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flaky_tests.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py View 13 chunks +19 lines, -19 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_from_try_jobs.py View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py View 5 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 17 (11 generated)
qyearsley
4 years, 4 months ago (2016-07-27 00:13:29 UTC) #3
wkorman
lgtm
4 years, 4 months ago (2016-07-29 18:35:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2188623002/1
4 years, 4 months ago (2016-07-29 18:42:54 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-07-29 21:09:12 UTC) #14
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/0c097eab9977221aff1c8155c9f907fdb529dd92 Cr-Commit-Position: refs/heads/master@{#408745}
4 years, 4 months ago (2016-07-29 21:11:22 UTC) #16
Dirk Pranke
4 years, 4 months ago (2016-08-09 00:53:19 UTC) #17
Message was sent while issue was closed.
lgtm (belatedly).

Powered by Google App Engine
This is Rietveld 408576698