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

Unified Diff: remoting/client/client_logger.cc

Issue 6621018: Convert Chromoting plugin logging to appear in client UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup comments Created 9 years, 7 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
Index: remoting/client/client_logger.cc
diff --git a/remoting/client/client_logger.cc b/remoting/client/client_logger.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8c2a8a7aaab44c2f1ed0ca3bc97881c857ec216e
--- /dev/null
+++ b/remoting/client/client_logger.cc
@@ -0,0 +1,46 @@
+// Copyright (c) 2010 The Chromium 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 "client_logger.h"
+
+#include <stdarg.h> // va_list
+
+#include "base/stringprintf.h"
+
+namespace remoting {
+
+ClientLogger::ClientLogger() {
+}
+
+ClientLogger::~ClientLogger() {
+}
+
+void ClientLogger::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, ...) {
+ va_list ap;
+ va_start(ap, format);
+ va_VLog(verboselevel, format, ap);
+ va_end(ap);
+}
+
+void ClientLogger::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) {
+ std::string message;
+ base::StringAppendV(&message, format, ap);
+ VLOG(verboselevel) << message;
+}
+
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698