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

Issue 2296783002: Adds new logging type SYSLOG which logs to the system log. (Closed)

Created:
4 years, 3 months ago by pastarmovj
Modified:
3 years, 11 months ago
Reviewers:
brettw, Evan Stade
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds new logging type SYSLOG which logs to the system log. On Windows this type logs to the Event Log and on POSIX systems it logs to the messages log (or its equvalent). As a side effect of adding the presubmit check for it this CL fixes running the presumbit checks tests on Windows. BUG=642115 Committed: https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4 Cr-Commit-Position: refs/heads/master@{#419758}

Patch Set 1 #

Patch Set 2 : Added presubmit check. #

Patch Set 3 : Moved the SYSLOG code to a separate file. #

Total comments: 6

Patch Set 4 : Addressed comments. #

Patch Set 5 : Added forgotten Windows header. #

Patch Set 6 : Fix ifdefs to limit compilation on unsupported platforms. #

Patch Set 7 : Copy/paste error. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -0 lines) Patch
M PRESUBMIT.py View 1 2 3 4 5 2 chunks +15 lines, -0 lines 2 comments Download
M PRESUBMIT_test.py View 1 3 4 6 chunks +24 lines, -0 lines 0 comments Download
M PRESUBMIT_test_mocks.py View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M base/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M base/logging.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A base/syslog_logging.h View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A base/syslog_logging.cc View 1 2 3 4 5 6 1 chunk +88 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (22 generated)
pastarmovj
Hi Brett, can you please review this CL? The linked bug has the context of ...
4 years, 3 months ago (2016-09-01 14:59:59 UTC) #3
brettw
How often do you expect this to be used? From reading the bug it seems ...
4 years, 3 months ago (2016-09-07 17:54:56 UTC) #4
pastarmovj
On 2016/09/07 17:54:56, brettw (ping on IM after 24h) wrote: > How often do you ...
4 years, 3 months ago (2016-09-07 21:01:41 UTC) #5
brettw
I still prefer adding a new thing instead of changing the shared logging. I think ...
4 years, 3 months ago (2016-09-12 21:04:29 UTC) #6
pastarmovj
How about that - I moved all the new stuff in separate files. Under the ...
4 years, 3 months ago (2016-09-14 00:25:33 UTC) #7
brettw
I can live with this design. https://codereview.chromium.org/2296783002/diff/40001/base/syslog_logging.cc File base/syslog_logging.cc (right): https://codereview.chromium.org/2296783002/diff/40001/base/syslog_logging.cc#newcode29 base/syslog_logging.cc:29: HANDLE event_log_handle = ...
4 years, 3 months ago (2016-09-14 22:33:48 UTC) #8
pastarmovj
Thanks! PTAL. https://codereview.chromium.org/2296783002/diff/40001/base/syslog_logging.cc File base/syslog_logging.cc (right): https://codereview.chromium.org/2296783002/diff/40001/base/syslog_logging.cc#newcode29 base/syslog_logging.cc:29: HANDLE event_log_handle = RegisterEventSourceA(NULL, kEventSource); On 2016/09/14 ...
4 years, 3 months ago (2016-09-15 21:27:10 UTC) #9
brettw
thanks for clarifying, lgtm
4 years, 3 months ago (2016-09-15 21:54:02 UTC) #10
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/2296783002/140001
4 years, 3 months ago (2016-09-20 14:53:14 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 3 months ago (2016-09-20 14:58:32 UTC) #30
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4 Cr-Commit-Position: refs/heads/master@{#419758}
4 years, 3 months ago (2016-09-20 14:59:55 UTC) #32
Evan Stade
https://codereview.chromium.org/2296783002/diff/140001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/2296783002/diff/140001/PRESUBMIT.py#newcode2223 PRESUBMIT.py:2223: if 'SYSLOG' in input_api.ReadFile(f, 'rb'): is there a particular ...
3 years, 11 months ago (2017-01-12 01:56:42 UTC) #34
pastarmovj
3 years, 11 months ago (2017-01-12 10:35:21 UTC) #35
Message was sent while issue was closed.
Hi Evan,
sorry for that. I changed the presubmit check to only check changed lines.
Cheers,
Julian

https://codereview.chromium.org/2296783002/diff/140001/PRESUBMIT.py
File PRESUBMIT.py (right):

https://codereview.chromium.org/2296783002/diff/140001/PRESUBMIT.py#newcode2223
PRESUBMIT.py:2223: if 'SYSLOG' in input_api.ReadFile(f, 'rb'):
On 2017/01/12 01:56:42, Evan Stade wrote:
> is there a particular reason to read the whole file and not changed contents?
> Every time I edit PRESUBMIT.py and run presubmit, it flags the SYSLOG on this
> line.

Problem solved :) https://codereview.chromium.org/2622083006/

Sorry for the inconvenience.

Powered by Google App Engine
This is Rietveld 408576698