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

Side by Side Diff: system_logging.cc

Issue 2868032: Remove source from crash-reporter and crash-dumper as they are no longer necessary. (Closed) Base URL: ssh://git@chromiumos-git//crash.git
Patch Set: Created 10 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 | « system_logging.h ('k') | system_logging_mock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <stdarg.h>
6 #include <syslog.h>
7
8 #include "crash/system_logging.h"
9
10 std::string SystemLoggingImpl::identity_;
11
12 SystemLoggingImpl::SystemLoggingImpl() {
13 }
14
15 SystemLoggingImpl::~SystemLoggingImpl() {
16 }
17
18 void SystemLoggingImpl::Initialize(const char *ident) {
19 // Man page does not specify if openlog copies its string or assumes
20 // the pointer is always valid, so make its scope global.
21 identity_ = ident;
22 openlog(identity_.c_str(), LOG_PID, LOG_USER);
23 }
24
25 void SystemLoggingImpl::LogInfo(const char *format, ...) {
26 va_list vl;
27 va_start(vl, format);
28 vsyslog(LOG_INFO, format, vl);
29 va_end(vl);
30 }
31
32 void SystemLoggingImpl::LogWarning(const char *format, ...) {
33 va_list vl;
34 va_start(vl, format);
35 vsyslog(LOG_WARNING, format, vl);
36 va_end(vl);
37 }
38
39 void SystemLoggingImpl::LogError(const char *format, ...) {
40 va_list vl;
41 va_start(vl, format);
42 vsyslog(LOG_ERR, format, vl);
43 va_end(vl);
44 }
OLDNEW
« no previous file with comments | « system_logging.h ('k') | system_logging_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698