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

Side by Side Diff: base/syslog_logging.cc

Issue 2288473002: Implement Dump-on-DCHECK (via a new LogSeverity). (Closed)
Patch Set: Pull the Official Windows build default in, and rebase Created 3 years, 10 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
« no previous file with comments | « base/logging_unittest.cc ('k') | base/test/gtest_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « base/logging_unittest.cc ('k') | base/test/gtest_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698