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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium 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 "client_logger.h"
6
7 #include <stdarg.h> // va_list
8
9 #include "base/stringprintf.h"
10
11 namespace remoting {
12
13 ClientLogger::ClientLogger() {
14 }
15
16 ClientLogger::~ClientLogger() {
17 }
18
19 void ClientLogger::Log(logging::LogSeverity severity, const char* format, ...) {
20 va_list ap;
21 va_start(ap, format);
22 va_Log(severity, format, ap);
23 va_end(ap);
24 }
25
26 void ClientLogger::VLog(int verboselevel, const char* format, ...) {
27 va_list ap;
28 va_start(ap, format);
29 va_VLog(verboselevel, format, ap);
30 va_end(ap);
31 }
32
33 void ClientLogger::va_Log(logging::LogSeverity severity,
34 const char* format, va_list ap) {
35 std::string message;
36 base::StringAppendV(&message, format, ap);
37 logging::LogMessage(__FILE__, __LINE__, severity).stream() << message;
38 }
39
40 void ClientLogger::va_VLog(int verboselevel, const char* format, va_list ap) {
41 std::string message;
42 base::StringAppendV(&message, format, ap);
43 VLOG(verboselevel) << message;
44 }
45
46 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698