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

Side by Side Diff: base/syslog_logging.h

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_SYSLOG_LOGGING_H_
6 #define BASE_SYSLOG_LOGGING_H_
7
8 #include "base/logging.h"
9
10 namespace logging {
11
12 // Keep in mind that the syslog is always active regardless of the logging level
13 // and applied flags. Use only for important information that a system
14 // administrator might need to maintain the browser installation.
15 #define SYSLOG_STREAM(severity) \
16 COMPACT_GOOGLE_LOG_EX_ ## severity(EventLogMessage).stream()
17 #define SYSLOG(severity) \
18 SYSLOG_STREAM(severity)
19
20 // Creates a formatted message on the system event log. That would be the
21 // Application Event log on Windows and the messages log file on POSIX systems.
22 class BASE_EXPORT EventLogMessage {
23 public:
24 EventLogMessage(const char* file, int line, LogSeverity severity);
25
26 ~EventLogMessage();
27
28 std::ostream& stream() { return log_message_.stream(); }
29
30 private:
31 LogMessage log_message_;
32
33 DISALLOW_COPY_AND_ASSIGN(EventLogMessage);
34 };
35
36 } // namespace logging
37
38 #endif // BASE_SYSLOG_LOGGING_H_
OLDNEW
« PRESUBMIT.py ('K') | « base/logging.h ('k') | base/syslog_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698