OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
brettw
2016/09/14 22:33:48
The new copyright block has no "(c)" and "2016" :)
pastarmovj
2016/09/15 21:27:10
Done.
| |
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_ | |
OLD | NEW |