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

Side by Side Diff: third_party/libjingle/overrides/talk/base/logging.h

Issue 71353010: Fix WebRTC logging so that logs from libpeerconnection make it to the log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 7 years, 1 month 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file overrides the logging macros in libjingle (talk/base/logging.h). 5 // This file overrides the logging macros in libjingle (talk/base/logging.h).
6 // Instead of using libjingle's logging implementation, the libjingle macros are 6 // Instead of using libjingle's logging implementation, the libjingle macros are
7 // mapped to the corresponding base/logging.h macro (chromium's VLOG). 7 // mapped to the corresponding base/logging.h macro (chromium's VLOG).
8 // If this file is included outside of libjingle (e.g. in wrapper code) it 8 // If this file is included outside of libjingle (e.g. in wrapper code) it
9 // should be included after base/logging.h (if any) or compiler error or 9 // should be included after base/logging.h (if any) or compiler error or
10 // unexpected behavior may occur (macros that have the same name in libjingle as 10 // unexpected behavior may occur (macros that have the same name in libjingle as
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 unprintable_count_[0] = unprintable_count_[1] = 0; 144 unprintable_count_[0] = unprintable_count_[1] = 0;
145 } 145 }
146 }; 146 };
147 147
148 // When possible, pass optional state variable to track various data across 148 // When possible, pass optional state variable to track various data across
149 // multiple calls to LogMultiline. Otherwise, pass NULL. 149 // multiple calls to LogMultiline. Otherwise, pass NULL.
150 void LogMultiline(LoggingSeverity level, const char* label, bool input, 150 void LogMultiline(LoggingSeverity level, const char* label, bool input,
151 const void* data, size_t len, bool hex_mode, 151 const void* data, size_t len, bool hex_mode,
152 LogMultilineState* state); 152 LogMultilineState* state);
153 153
154 // TODO(grunell): Change name to InitDiagnosticLoggingDelegate or
155 // InitDiagnosticLogging. Change also in init_webrtc.h/cc.
156 // TODO(grunell): typedef the delegate function.
154 void InitDiagnosticLoggingDelegateFunction( 157 void InitDiagnosticLoggingDelegateFunction(
155 void (*delegate)(const std::string&)); 158 void (*delegate)(const std::string&));
156 159
160 void SetExtraLoggingInit(
161 void (*function)(void (*delegate)(const std::string&)));
157 } // namespace talk_base 162 } // namespace talk_base
158 163
159 ////////////////////////////////////////////////////////////////////// 164 //////////////////////////////////////////////////////////////////////
160 // Libjingle macros which are mapped over to their VLOG equivalent in 165 // Libjingle macros which are mapped over to their VLOG equivalent in
161 // base/logging.h 166 // base/logging.h
162 ////////////////////////////////////////////////////////////////////// 167 //////////////////////////////////////////////////////////////////////
163 168
164 #if defined(LOGGING_INSIDE_LIBJINGLE) 169 #if defined(LOGGING_INSIDE_LIBJINGLE)
165 170
166 #define DIAGNOSTIC_LOG(sev, ctx, err, ...) \ 171 #define DIAGNOSTIC_LOG(sev, ctx, err, ...) \
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 #define LOG_ERR(sev) LOG_ERRNO(sev) 207 #define LOG_ERR(sev) LOG_ERRNO(sev)
203 #define LAST_SYSTEM_ERROR (errno) 208 #define LAST_SYSTEM_ERROR (errno)
204 #endif // OS_WIN 209 #endif // OS_WIN
205 210
206 #undef PLOG 211 #undef PLOG
207 #define PLOG(sev, err) LOG_ERR_EX(sev, err) 212 #define PLOG(sev, err) LOG_ERR_EX(sev, err)
208 213
209 #endif // LOGGING_INSIDE_LIBJINGLE 214 #endif // LOGGING_INSIDE_LIBJINGLE
210 215
211 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_ 216 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « third_party/libjingle/overrides/initialize_module.cc ('k') | third_party/libjingle/overrides/talk/base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698