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

Unified Diff: PRESUBMIT.py

Issue 2296783002: Adds new logging type SYSLOG which logs to the system log. (Closed)
Patch Set: Copy/paste error. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 0076836a086d7d5f7530b3f8caff282c84ad9f98..7d87d8850f6975eb4d1f36c0c152a686c773c9ee 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -2215,6 +2215,20 @@ def _CheckForWindowsLineEndings(input_api, output_api):
return []
+def _CheckSyslogUseWarning(input_api, output_api, source_file_filter=None,
+ lint_filters=None, verbose_level=None):
+ """Checks that all source files use SYSLOG properly."""
+ syslog_files = []
+ for f in input_api.AffectedSourceFiles(source_file_filter):
+ if 'SYSLOG' in input_api.ReadFile(f, 'rb'):
Evan Stade 2017/01/12 01:56:42 is there a particular reason to read the whole fil
pastarmovj 2017/01/12 10:35:21 Problem solved :) https://codereview.chromium.org/
+ syslog_files.append(f.LocalPath())
+ if syslog_files:
+ return [output_api.PresubmitPromptWarning(
+ 'Please make sure there are no privacy sensitive bits of data in SYSLOG'
+ ' calls.\nFiles to check:\n', items=syslog_files)]
+ return []
+
+
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_CommonChecks(input_api, output_api))
@@ -2223,6 +2237,7 @@ def CheckChangeOnUpload(input_api, output_api):
input_api.canned_checks.CheckGNFormatted(input_api, output_api))
results.extend(_CheckUmaHistogramChanges(input_api, output_api))
results.extend(_AndroidSpecificOnUploadChecks(input_api, output_api))
+ results.extend(_CheckSyslogUseWarning(input_api, output_api))
return results
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698