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

Unified Diff: base/chromeos/logging.h

Issue 1923943003: Add logging to remote commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Noop on non-chromeos builds Created 4 years, 6 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
Index: base/chromeos/logging.h
diff --git a/base/chromeos/logging.h b/base/chromeos/logging.h
new file mode 100644
index 0000000000000000000000000000000000000000..9cdc51f2e6dc664bea52a00de1e962b8a6b7a976
--- /dev/null
+++ b/base/chromeos/logging.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_CHROMEOS_LOGGING_H_
+#define BASE_CHROMEOS_LOGGING_H_
+
+#include "base/logging.h"
+
+namespace logging {
+
+#if defined(OS_CHROMEOS)
+
+// These macros are used to log events on ChromeOS which we want to be included
+// in the system log of the device.
+#define CHROMEOS_SYSLOG(severity) LOG(severity)
Nico 2016/06/04 01:25:00 Do you need separate severities for syslog entries
Marton Hunyady 2016/06/06 08:28:54 I think it's better to separate the failures (e.g.
+#define CHROMEOS_SYSLOG_IF(severity, condition) LOG_IF(severity, condition)
+
+#else // Not defined(OS_CHROMEOS)
+
+#define CHROMEOS_SYSLOG(severity) LOG_IF(severity, false)
+#define CHROMEOS_SYSLOG_IF(severity, condition) LOG_IF(severity, false)
+
+#endif // defined(OS_CHROMEOS)
+
+} // namespace logging
+
+#endif // BASE_CHROMEOS_LOGGING_H_

Powered by Google App Engine
This is Rietveld 408576698