1 // Copyright (c) 2011 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.
5 #include "remoting/client/client_logger.h"
7 #include <stdarg.h> // va_list
9 #include "base/stringprintf.h"
13 ClientLogger::ClientLogger() {
16 ClientLogger::~ClientLogger() {
19 void ClientLogger::Log(logging::LogSeverity severity
, const char* format
, ...) {
22 va_Log(severity
, format
, ap
);
26 void ClientLogger::VLog(int verboselevel
, const char* format
, ...) {
29 va_VLog(verboselevel
, format
, ap
);
33 void ClientLogger::va_Log(logging::LogSeverity severity
,
34 const char* format
, va_list ap
) {
36 base::StringAppendV(&message
, format
, ap
);
37 logging::LogMessage(__FILE__
, __LINE__
, severity
).stream() << message
;
40 void ClientLogger::va_VLog(int verboselevel
, const char* format
, va_list ap
) {
42 base::StringAppendV(&message
, format
, ap
);
43 VLOG(verboselevel
) << message
;
46 } // namespace remoting