OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/debug/stack_trace.h" | 5 #include "base/debug/stack_trace.h" |
6 #include "base/syslog_logging.h" | 6 #include "base/syslog_logging.h" |
7 | 7 |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
11 #include "base/win/eventlog_messages.h" | 11 #include "base/win/eventlog_messages.h" |
12 | 12 |
13 #include <windows.h> | 13 #include <windows.h> |
14 #elif defined(OS_LINUX) | 14 #elif defined(OS_LINUX) |
15 #include <syslog.h> | 15 #include <syslog.h> |
16 #undef LOG_WARNING | |
Wez
2017/01/15 01:18:44
Yup, our LogSeverity name for warnings happens to
| |
16 #endif | 17 #endif |
17 | 18 |
18 #include <cstring> | 19 #include <cstring> |
19 #include <ostream> | 20 #include <ostream> |
20 #include <string> | 21 #include <string> |
21 | 22 |
22 namespace logging { | 23 namespace logging { |
23 | 24 |
24 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
25 | 26 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 case LOG_FATAL: | 101 case LOG_FATAL: |
101 priority = 2; | 102 priority = 2; |
102 break; | 103 break; |
103 } | 104 } |
104 syslog(priority, "%s", log_message_.str().c_str()); | 105 syslog(priority, "%s", log_message_.str().c_str()); |
105 closelog(); | 106 closelog(); |
106 #endif // defined(OS_WIN) | 107 #endif // defined(OS_WIN) |
107 } | 108 } |
108 | 109 |
109 } // namespace logging | 110 } // namespace logging |
OLD | NEW |