New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642115 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Feature



Sign in to add a comment

Enterprise support feature request

Project Member Reported by nrpeter@chromium.org, Aug 29 2016

Issue description

Description:
Non-debug versions of Chrome log to the system log on Mac and Linux. The same can not be said about Windows, where logs are only saved to the file "chrome_debug.log". This feature will introduce a new log type and log macro (SLOG) short for "system log". Any logs using the SLOG macro will save to the Windows Event Log. 

Use case:
Many schools / enterprises that run Windows clients collect event logs for finding / diagnosing system problems. We need a way of notifying admins when force-installed extensions (e.g. web filtering extensions) are corrupted, and a repair is attempted. 

Motivation:
go/chrome-extensions-cy

Existing workarounds:
1. Turn on logging in Chrome w/ command line flags (easy to bypass)
2. Write program to tail chrome_debug.log file, filter the logs we want & create event logs
3. Distribute agent to all Windows computers in an organization
 
Cc: blumberg@chromium.org atwilson@chromium.org
Status: Assigned (was: Untriaged)
https://codereview.chromium.org/2296783002/ This is a proof of concept that this is possible. The CL as it is works on Windows well but if we want to play nicely there are a few more things to do 
1. Create a message resource file for Chrome. https://msdn.microsoft.com/en-us/library/windows/desktop/dd996906(v=vs.85).aspx
2. Add code in the installer to register our messages with the event log. https://msdn.microsoft.com/en-us/library/windows/desktop/aa363661%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
but even as it is now - messages to end up in readable form in the event log.

The other aspect I am about to discuss tomorrow with the Chrome privacy team is if we need any particular safeguards in place to ensure no PII data ends up there as Chrome's logs are known to be chatty and extra care should be taken about this one since it will be on all the time.

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 20 2016

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

commit 89f7ee10f03d696276adf1cdc901c949a2e091d4
Author: pastarmovj <pastarmovj@chromium.org>
Date: Tue Sep 20 14:58:13 2016

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 

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

[modify] https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4/PRESUBMIT.py
[modify] https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4/PRESUBMIT_test.py
[modify] https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4/PRESUBMIT_test_mocks.py
[modify] https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4/base/BUILD.gn
[modify] https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4/base/logging.h
[add] https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4/base/syslog_logging.cc
[add] https://crrev.com/89f7ee10f03d696276adf1cdc901c949a2e091d4/base/syslog_logging.h

Labels: Merge-Request-54

For CL: https://codereview.chromium.org/2296783002/

To facilitate logging of messages from:  
https://bugs.chromium.org/p/chromium/issues/detail?id=447040
Labels: Merge-Request-54
setting the label for comment 3.

Comment 5 by dimu@chromium.org, Oct 4 2016

Labels: -Merge-Request-54 Merge-Review-54 Hotlist-Merge-Review
[Automated comment] Less than 2 weeks to go before stable on M54, manual review required.
Due to a code yellow, this didn't land in Dev for M54. We'll have to re-adjust the launch date.
Labels: -Merge-Review-54 Merge-Approved-54
Approving for merge into M54 (build 2840), the CL looks pretty low risk and unlikely to cause a regression.
Please ignore comment #6. It was meant for a different chrome bug.
Labels: M-54
Please have a the CL merged before 4.00 PM today(10/04), so it gets picked up for tomorrows Beta release.
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 5 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3

commit 8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3
Author: Julian Pastarmov <pastarmovj@chromium.org>
Date: Wed Oct 05 09:37:52 2016

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 

Review-Url: https://codereview.chromium.org/2296783002
Cr-Commit-Position: refs/heads/master@{#419758}
(cherry picked from commit 89f7ee10f03d696276adf1cdc901c949a2e091d4)

Review URL: https://codereview.chromium.org/2397443003 .

Cr-Commit-Position: refs/branch-heads/2840@{#648}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/PRESUBMIT.py
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/PRESUBMIT_test.py
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/PRESUBMIT_test_mocks.py
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/BUILD.gn
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/logging.h
[add] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/syslog_logging.cc
[add] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/syslog_logging.h

Status: Fixed (was: Assigned)
Project Member

Comment 12 by bugdroid1@chromium.org, Oct 27 2016

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

commit 8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3
Author: Julian Pastarmov <pastarmovj@chromium.org>
Date: Wed Oct 05 09:37:52 2016

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 

Review-Url: https://codereview.chromium.org/2296783002
Cr-Commit-Position: refs/heads/master@{#419758}
(cherry picked from commit 89f7ee10f03d696276adf1cdc901c949a2e091d4)

Review URL: https://codereview.chromium.org/2397443003 .

Cr-Commit-Position: refs/branch-heads/2840@{#648}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/PRESUBMIT.py
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/PRESUBMIT_test.py
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/PRESUBMIT_test_mocks.py
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/BUILD.gn
[modify] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/logging.h
[add] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/syslog_logging.cc
[add] https://crrev.com/8d3b68f910ec25e44b210be4d8f3c8fd1fae6bb3/base/syslog_logging.h

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 14 2016

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

commit cee58011177e2cf4bb8cfd08e64b0cd48629b0ff
Author: pastarmovj <pastarmovj@chromium.org>
Date: Mon Nov 14 13:49:48 2016

Adds eventlog provider dll to describe the message types of SYSLOG.

Creates a dll file that can be registered with the system event-logging
mechanisms on Windows to make the events generated when using the SYSLOG
macro nicer to read in the Event Viewer snapin.

BUG= 642115 
TEST=manual

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

[modify] https://crrev.com/cee58011177e2cf4bb8cfd08e64b0cd48629b0ff/base/BUILD.gn
[modify] https://crrev.com/cee58011177e2cf4bb8cfd08e64b0cd48629b0ff/base/syslog_logging.cc
[modify] https://crrev.com/cee58011177e2cf4bb8cfd08e64b0cd48629b0ff/base/win/BUILD.gn
[add] https://crrev.com/cee58011177e2cf4bb8cfd08e64b0cd48629b0ff/base/win/eventlog_messages.mc
[modify] https://crrev.com/cee58011177e2cf4bb8cfd08e64b0cd48629b0ff/chrome/BUILD.gn

Project Member

Comment 14 by bugdroid1@chromium.org, Nov 14 2016

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

commit 145864aeae7cb83aefb0c645f23705f174a1850e
Author: pdr <pdr@chromium.org>
Date: Mon Nov 14 18:16:29 2016

Revert of Adds eventlog provider dll to describe the message types of SYSLOG. (patchset #2 id:20001 of https://codereview.chromium.org/2476353003/ )

Reason for revert:
Caused windows compile errors:
https://uberchromegw.corp.google.com/i/chromium/builders/Win/builds/49108/steps/steps/logs/stdio

[1/1] LINK(DLL) eventlog_provider.dll eventlog_provider.dll.lib eventlog_provider.dll.pdb
ninja explain: output eventlog_provider.dll.lib doesn't exist
ninja explain: eventlog_provider.dll.lib is dirty

Original issue's description:
> Adds eventlog provider dll to describe the message types of SYSLOG.
>
> Creates a dll file that can be registered with the system event-logging
> mechanisms on Windows to make the events generated when using the SYSLOG
> macro nicer to read in the Event Viewer snapin.
>
> BUG= 642115 
> TEST=manual
>
> Committed: https://crrev.com/cee58011177e2cf4bb8cfd08e64b0cd48629b0ff
> Cr-Commit-Position: refs/heads/master@{#431872}

TBR=brettw@chromium.org,pastarmovj@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 642115 

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

[modify] https://crrev.com/145864aeae7cb83aefb0c645f23705f174a1850e/base/BUILD.gn
[modify] https://crrev.com/145864aeae7cb83aefb0c645f23705f174a1850e/base/syslog_logging.cc
[modify] https://crrev.com/145864aeae7cb83aefb0c645f23705f174a1850e/base/win/BUILD.gn
[delete] https://crrev.com/5876956faa38aef22e53b4a8712d5a87c4980578/base/win/eventlog_messages.mc
[modify] https://crrev.com/145864aeae7cb83aefb0c645f23705f174a1850e/chrome/BUILD.gn

Project Member

Comment 15 by bugdroid1@chromium.org, Nov 17 2016

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

commit 35a1fb75849c0b9d24b8d699ebbae2e37b2235f7
Author: pastarmovj <pastarmovj@chromium.org>
Date: Thu Nov 17 13:18:43 2016

Reland:Adds eventlog provider dll to describe the message types of SYSLOG.

Creates a dll file that can be registered with the system event-logging
mechanisms on Windows to make the events generated when using the SYSLOG
macro nicer to read in the Event Viewer snapin.

BUG= 642115 
TEST=manual

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

[modify] https://crrev.com/35a1fb75849c0b9d24b8d699ebbae2e37b2235f7/base/BUILD.gn
[modify] https://crrev.com/35a1fb75849c0b9d24b8d699ebbae2e37b2235f7/base/syslog_logging.cc
[modify] https://crrev.com/35a1fb75849c0b9d24b8d699ebbae2e37b2235f7/base/win/BUILD.gn
[add] https://crrev.com/35a1fb75849c0b9d24b8d699ebbae2e37b2235f7/base/win/eventlog_messages.mc
[add] https://crrev.com/35a1fb75849c0b9d24b8d699ebbae2e37b2235f7/base/win/eventlog_provider.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Dec 20 2016

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

commit e064666e44e4f3821559ce188cfaf4d696dd4668
Author: pastarmovj <pastarmovj@chromium.org>
Date: Tue Dec 20 13:33:57 2016

Install the chrome event log provider together with the browser.

The dll will always be present but only registered when running
a system install because we need access to the LOCAL_MACHINE hive.

BUG= 642115 
TEST=setup_util_unittest,mini_installer,manual

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

[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/installer/mini_installer/chrome.release
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/installer/setup/DEPS
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/installer/setup/install.cc
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/installer/setup/setup_util.cc
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/installer/setup/setup_util.h
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/installer/setup/setup_util_unittest.cc
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/installer/setup/uninstall.cc
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/test/mini_installer/config/chrome_system_installed.prop
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/test/mini_installer/config/chrome_system_updated.prop
[modify] https://crrev.com/e064666e44e4f3821559ce188cfaf4d696dd4668/chrome/tools/build/win/FILES.cfg

Project Member

Comment 17 by bugdroid1@chromium.org, Jun 23 2017

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

commit fe47600213937d47019402f8bda6198c464d37b3
Author: proberge <proberge@chromium.org>
Date: Fri Jun 23 14:29:01 2017

Move eventlog_provider from //base/win to //chrome/common/win.

This removes a //chrome dependency in base (process_version_rc_template),
allowing //base to be used by targets that do not have access to //chrome.

BUG= 642115 
TEST=eventlog_provider.dll is installed and SYSLOG works.

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

[modify] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/BUILD.gn
[modify] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/base/BUILD.gn
[modify] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/base/syslog_logging.cc
[modify] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/base/syslog_logging.h
[modify] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/base/win/BUILD.gn
[modify] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/chrome/common/BUILD.gn
[modify] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/chrome/common/logging_chrome.cc
[add] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/chrome/common/win/BUILD.gn
[rename] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/chrome/common/win/eventlog_messages.mc
[rename] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/chrome/common/win/eventlog_provider.cc
[rename] https://crrev.com/fe47600213937d47019402f8bda6198c464d37b3/chrome/common/win/eventlog_provider.ver

Sign in to add a comment