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

Issue 15657002: Mirror syncfs log to console and WebUI, with LogSeverity support. (Closed)

Created:
7 years, 7 months ago by calvinlo
Modified:
7 years, 7 months ago
CC:
chromium-reviews, tzik+watch_chromium.org, kinuko+watch
Visibility:
Public.

Description

Mirror syncfs log to console and WebUI, with LogSeverity support. Please note that this supports INFO, WARNING, ERROR. I have yet to add support for DVLOG levels. BUG=241689 TEST=chrome/browser/sync_file_system/logger_unittest.cc unit_tests.LoggerTest* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202424

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fixed Typos #

Patch Set 3 : hiroki review #1, adding tests now #

Patch Set 4 : Added tests #

Total comments: 18

Patch Set 5 : Use macros so file name and line of original log call site are retained. #

Patch Set 6 : Needed to add back LogToConsole function #

Patch Set 7 : Rebase #

Total comments: 7

Patch Set 8 : Simplified macro #

Total comments: 2

Patch Set 9 : No Macro, Use logging::RawLog instead of needing helper LogToConsole() #

Total comments: 8

Patch Set 10 : Tzik review #

Patch Set 11 : Rebase #

Total comments: 4

Patch Set 12 : expect -> assert fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -19 lines) Patch
M chrome/browser/sync_file_system/drive/api_util.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/sync_file_system/drive_file_sync_service.cc View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -4 lines 0 comments Download
M chrome/browser/sync_file_system/drive_file_sync_util.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/sync_file_system/drive_metadata_store.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/sync_file_system/local_file_sync_service.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/sync_file_system/logger.h View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/sync_file_system/logger.cc View 1 2 3 4 5 6 7 8 9 3 chunks +42 lines, -2 lines 0 comments Download
A chrome/browser/sync_file_system/logger_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +71 lines, -0 lines 0 comments Download
M chrome/browser/sync_file_system/sync_file_system_service.cc View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -5 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
calvinlo
Hi Hiroki, can you please take an initial look at this to see if this ...
7 years, 7 months ago (2013-05-22 04:53:06 UTC) #1
nhiroki
Looks good to me https://codereview.chromium.org/15657002/diff/1/chrome/browser/sync_file_system/drive/api_util.cc File chrome/browser/sync_file_system/drive/api_util.cc (right): https://codereview.chromium.org/15657002/diff/1/chrome/browser/sync_file_system/drive/api_util.cc#newcode311 chrome/browser/sync_file_system/drive/api_util.cc:311: util::Log(logging::LOG_ERROR, nit: Can you align ...
7 years, 7 months ago (2013-05-22 05:42:40 UTC) #2
calvinlo
Also added tests now. I think the patch is complete enough now for final review. ...
7 years, 7 months ago (2013-05-22 08:42:56 UTC) #3
nhiroki
https://codereview.chromium.org/15657002/diff/15001/chrome/browser/sync_file_system/logger.cc File chrome/browser/sync_file_system/logger.cc (right): https://codereview.chromium.org/15657002/diff/15001/chrome/browser/sync_file_system/logger.cc#newcode52 chrome/browser/sync_file_system/logger.cc:52: // Static nit: I think you don't have to ...
7 years, 7 months ago (2013-05-22 09:18:24 UTC) #4
tzik
https://codereview.chromium.org/15657002/diff/15001/chrome/browser/sync_file_system/logger.cc File chrome/browser/sync_file_system/logger.cc (right): https://codereview.chromium.org/15657002/diff/15001/chrome/browser/sync_file_system/logger.cc#newcode33 chrome/browser/sync_file_system/logger.cc:33: void LogToConsole(logging::LogSeverity level, std::string log_event) { const ref? https://codereview.chromium.org/15657002/diff/15001/chrome/browser/sync_file_system/sync_file_system_service.cc ...
7 years, 7 months ago (2013-05-22 09:30:54 UTC) #5
tzik
https://codereview.chromium.org/15657002/diff/15001/chrome/browser/sync_file_system/logger.cc File chrome/browser/sync_file_system/logger.cc (right): https://codereview.chromium.org/15657002/diff/15001/chrome/browser/sync_file_system/logger.cc#newcode74 chrome/browser/sync_file_system/logger.cc:74: ptr->Log("%s", (level_string + what).c_str()); Not needed in this CL, ...
7 years, 7 months ago (2013-05-22 09:35:56 UTC) #6
calvinlo
Please see the screenshot attached to the bug https://code.google.com/p/chromium/issues/detail?id=241689 for reference of how this looks ...
7 years, 7 months ago (2013-05-23 10:00:15 UTC) #7
tzik
https://codereview.chromium.org/15657002/diff/40001/chrome/browser/sync_file_system/logger.cc File chrome/browser/sync_file_system/logger.cc (right): https://codereview.chromium.org/15657002/diff/40001/chrome/browser/sync_file_system/logger.cc#newcode73 chrome/browser/sync_file_system/logger.cc:73: base::FilePath path(FILE_PATH_LITERAL(location.file_name())); FILE_PATH_LITERAL is only for a literal. This ...
7 years, 7 months ago (2013-05-24 04:08:32 UTC) #8
calvinlo
https://codereview.chromium.org/15657002/diff/40001/chrome/browser/sync_file_system/logger.cc File chrome/browser/sync_file_system/logger.cc (right): https://codereview.chromium.org/15657002/diff/40001/chrome/browser/sync_file_system/logger.cc#newcode73 chrome/browser/sync_file_system/logger.cc:73: base::FilePath path(FILE_PATH_LITERAL(location.file_name())); On 2013/05/24 04:08:32, tzik wrote: > FILE_PATH_LITERAL ...
7 years, 7 months ago (2013-05-24 05:12:43 UTC) #9
tzik
https://codereview.chromium.org/15657002/diff/40001/chrome/browser/sync_file_system/logger.cc File chrome/browser/sync_file_system/logger.cc (right): https://codereview.chromium.org/15657002/diff/40001/chrome/browser/sync_file_system/logger.cc#newcode88 chrome/browser/sync_file_system/logger.cc:88: LogToConsole(severity, log_output); On 2013/05/24 05:12:43, calvinlo wrote: > On ...
7 years, 7 months ago (2013-05-24 11:17:38 UTC) #10
calvinlo
https://codereview.chromium.org/15657002/diff/55001/chrome/browser/sync_file_system/logger.h File chrome/browser/sync_file_system/logger.h (right): https://codereview.chromium.org/15657002/diff/55001/chrome/browser/sync_file_system/logger.h#newcode34 chrome/browser/sync_file_system/logger.h:34: FROM_HERE, logging::LOG_##severity, format, ##__VA_ARGS__); On 2013/05/24 11:17:38, tzik wrote: ...
7 years, 7 months ago (2013-05-25 06:03:25 UTC) #11
kinuko
I've written a few high-level comments on the issue. I continue to defer this review ...
7 years, 7 months ago (2013-05-27 02:30:46 UTC) #12
nhiroki
lgtm, please wait for tzik-san's comment
7 years, 7 months ago (2013-05-27 08:34:32 UTC) #13
tzik
lgtm https://codereview.chromium.org/15657002/diff/68002/chrome/browser/sync_file_system/logger.h File chrome/browser/sync_file_system/logger.h (right): https://codereview.chromium.org/15657002/diff/68002/chrome/browser/sync_file_system/logger.h#newcode26 chrome/browser/sync_file_system/logger.h:26: tracked_objects::Location location, const ref? https://codereview.chromium.org/15657002/diff/68002/chrome/browser/sync_file_system/logger_unittest.cc File chrome/browser/sync_file_system/logger_unittest.cc (right): ...
7 years, 7 months ago (2013-05-27 09:08:51 UTC) #14
calvinlo
https://codereview.chromium.org/15657002/diff/68002/chrome/browser/sync_file_system/logger.h File chrome/browser/sync_file_system/logger.h (right): https://codereview.chromium.org/15657002/diff/68002/chrome/browser/sync_file_system/logger.h#newcode26 chrome/browser/sync_file_system/logger.h:26: tracked_objects::Location location, On 2013/05/27 09:08:52, tzik wrote: > const ...
7 years, 7 months ago (2013-05-27 09:29:27 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calvinlo@chromium.org/15657002/84001
7 years, 7 months ago (2013-05-27 09:32:15 UTC) #16
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 7 months ago (2013-05-27 10:00:29 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calvinlo@chromium.org/15657002/84005
7 years, 7 months ago (2013-05-27 10:41:17 UTC) #18
tzik
https://codereview.chromium.org/15657002/diff/84005/chrome/browser/sync_file_system/logger_unittest.cc File chrome/browser/sync_file_system/logger_unittest.cc (right): https://codereview.chromium.org/15657002/diff/84005/chrome/browser/sync_file_system/logger_unittest.cc#newcode46 chrome/browser/sync_file_system/logger_unittest.cc:46: EXPECT_EQ(3u, log.size()); The three EXPECT_TRUE below do not cause ...
7 years, 7 months ago (2013-05-27 10:55:44 UTC) #19
calvinlo
On 2013/05/27 10:55:44, tzik wrote: > https://codereview.chromium.org/15657002/diff/84005/chrome/browser/sync_file_system/logger_unittest.cc > File chrome/browser/sync_file_system/logger_unittest.cc (right): > > https://codereview.chromium.org/15657002/diff/84005/chrome/browser/sync_file_system/logger_unittest.cc#newcode46 > ...
7 years, 7 months ago (2013-05-27 11:02:33 UTC) #20
calvinlo
https://codereview.chromium.org/15657002/diff/84005/chrome/browser/sync_file_system/logger_unittest.cc File chrome/browser/sync_file_system/logger_unittest.cc (right): https://codereview.chromium.org/15657002/diff/84005/chrome/browser/sync_file_system/logger_unittest.cc#newcode46 chrome/browser/sync_file_system/logger_unittest.cc:46: EXPECT_EQ(3u, log.size()); On 2013/05/27 10:55:45, tzik wrote: > The ...
7 years, 7 months ago (2013-05-27 11:02:42 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calvinlo@chromium.org/15657002/99001
7 years, 7 months ago (2013-05-27 11:03:19 UTC) #22
commit-bot: I haz the power
7 years, 7 months ago (2013-05-27 14:35:27 UTC) #23
Message was sent while issue was closed.
Change committed as 202424

Powered by Google App Engine
This is Rietveld 408576698