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

Side by Side Diff: base/syslog_logging.cc

Issue 2712823003: Various logging-related cleanups & reformatting. (Closed)
Patch Set: Fix base unit-tests Created 3 years, 6 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 // <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
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
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