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

Unified Diff: system_logging.cc

Issue 6517001: crash-reporter: Use standard logging and new libchromeos Process code (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crash-reporter.git@master
Patch Set: More comments Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « system_logging.h ('k') | system_logging_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: system_logging.cc
diff --git a/system_logging.cc b/system_logging.cc
deleted file mode 100644
index 04bb356ec4f6a0f5423681bef65a52024b1da748..0000000000000000000000000000000000000000
--- a/system_logging.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "crash-reporter/system_logging.h"
-
-#include <syslog.h>
-
-#include "base/stringprintf.h"
-
-std::string SystemLoggingImpl::identity_;
-
-SystemLoggingImpl::SystemLoggingImpl() : is_accumulating_(false) {
-}
-
-SystemLoggingImpl::~SystemLoggingImpl() {
-}
-
-void SystemLoggingImpl::Initialize(const char *ident) {
- // Man page does not specify if openlog copies its string or assumes
- // the pointer is always valid, so make its scope global.
- identity_ = ident;
- openlog(identity_.c_str(), LOG_PID, LOG_USER);
-}
-
-void SystemLoggingImpl::LogWithLevel(int level, const char *format,
- va_list arg_list) {
- std::string message = StringPrintV(format, arg_list);
- syslog(level, "%s", message.c_str());
- if (is_accumulating_) {
- accumulator_.append(message);
- accumulator_.push_back('\n');
- }
-}
-
-void SystemLoggingImpl::LogInfo(const char *format, ...) {
- va_list vl;
- va_start(vl, format);
- LogWithLevel(LOG_INFO, format, vl);
- va_end(vl);
-}
-
-void SystemLoggingImpl::LogWarning(const char *format, ...) {
- va_list vl;
- va_start(vl, format);
- LogWithLevel(LOG_WARNING, format, vl);
- va_end(vl);
-}
-
-void SystemLoggingImpl::LogError(const char *format, ...) {
- va_list vl;
- va_start(vl, format);
- LogWithLevel(LOG_ERR, format, vl);
- va_end(vl);
-}
« 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