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

Unified Diff: remoting/base/logger.cc

Issue 7262015: Conenct Chromoting plugin debug log to JS UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 5 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 | « remoting/base/logger.h ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/logger.cc
diff --git a/remoting/client/client_logger.cc b/remoting/base/logger.cc
similarity index 60%
rename from remoting/client/client_logger.cc
rename to remoting/base/logger.cc
index b970697ab838b49a1bbf2d7003187d933a443c6e..f4def7bc9503fc6b51a0e7702c5bbc37aab94fa7 100644
--- a/remoting/client/client_logger.cc
+++ b/remoting/base/logger.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "remoting/client/client_logger.h"
+#include "remoting/base/logger.h"
#include <stdarg.h> // va_list
@@ -10,34 +10,38 @@
namespace remoting {
-ClientLogger::ClientLogger() {
+// Copied from base/logging.cc.
+const char* const Logger::log_severity_names[logging::LOG_NUM_SEVERITIES] = {
+ "INFO", "WARNING", "ERROR", "ERROR_REPORT", "FATAL" };
+
+Logger::Logger() {
}
-ClientLogger::~ClientLogger() {
+Logger::~Logger() {
}
-void ClientLogger::Log(logging::LogSeverity severity, const char* format, ...) {
+void Logger::Log(logging::LogSeverity severity, const char* format, ...) {
va_list ap;
va_start(ap, format);
va_Log(severity, format, ap);
va_end(ap);
}
-void ClientLogger::VLog(int verboselevel, const char* format, ...) {
+void Logger::VLog(int verboselevel, const char* format, ...) {
va_list ap;
va_start(ap, format);
va_VLog(verboselevel, format, ap);
va_end(ap);
}
-void ClientLogger::va_Log(logging::LogSeverity severity,
+void Logger::va_Log(logging::LogSeverity severity,
const char* format, va_list ap) {
std::string message;
base::StringAppendV(&message, format, ap);
logging::LogMessage(__FILE__, __LINE__, severity).stream() << message;
}
-void ClientLogger::va_VLog(int verboselevel, const char* format, va_list ap) {
+void Logger::va_VLog(int verboselevel, const char* format, va_list ap) {
std::string message;
base::StringAppendV(&message, format, ap);
VLOG(verboselevel) << message;
« no previous file with comments | « remoting/base/logger.h ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698