| 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 // <syslog.h> defines a LOG_WARNING macro that could conflict with |
| 16 // base::LOG_WARNING. |
| 15 #include <syslog.h> | 17 #include <syslog.h> |
| 18 #undef LOG_WARNING |
| 16 #endif | 19 #endif |
| 17 | 20 |
| 18 #include <cstring> | 21 #include <cstring> |
| 19 #include <ostream> | 22 #include <ostream> |
| 20 #include <string> | 23 #include <string> |
| 21 | 24 |
| 22 namespace logging { | 25 namespace logging { |
| 23 | 26 |
| 24 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
| 25 | 28 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 case LOG_FATAL: | 103 case LOG_FATAL: |
| 101 priority = 2; | 104 priority = 2; |
| 102 break; | 105 break; |
| 103 } | 106 } |
| 104 syslog(priority, "%s", log_message_.str().c_str()); | 107 syslog(priority, "%s", log_message_.str().c_str()); |
| 105 closelog(); | 108 closelog(); |
| 106 #endif // defined(OS_WIN) | 109 #endif // defined(OS_WIN) |
| 107 } | 110 } |
| 108 | 111 |
| 109 } // namespace logging | 112 } // namespace logging |
| OLD | NEW |