OLD | NEW |
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // When possible, pass optional state variable to track various data across | 162 // When possible, pass optional state variable to track various data across |
163 // multiple calls to LogMultiline. Otherwise, pass NULL. | 163 // multiple calls to LogMultiline. Otherwise, pass NULL. |
164 void LogMultiline(LoggingSeverity level, const char* label, bool input, | 164 void LogMultiline(LoggingSeverity level, const char* label, bool input, |
165 const void* data, size_t len, bool hex_mode, | 165 const void* data, size_t len, bool hex_mode, |
166 LogMultilineState* state); | 166 LogMultilineState* state); |
167 | 167 |
168 // Registers a delegate to receive diagnostic logging messages. Not thread safe, | 168 // Registers a delegate to receive diagnostic logging messages. Not thread safe, |
169 // must be called from the same thread. | 169 // must be called from the same thread. |
170 void InitDiagnosticLoggingDelegate(LogMessageDelegate* delegate); | 170 void InitDiagnosticLoggingDelegate(LogMessageDelegate* delegate); |
171 | 171 |
| 172 // Tells the logging delegate to initialize diagnostic logging. May only be |
| 173 // called on the signalling thread. |
| 174 void InitDiagnosticLoggingInEmbedder(const std::string& app_session_id, |
| 175 const std::string& app_url); |
| 176 |
172 } // namespace talk_base | 177 } // namespace talk_base |
173 | 178 |
174 ////////////////////////////////////////////////////////////////////// | 179 ////////////////////////////////////////////////////////////////////// |
175 // Libjingle macros which are mapped over to their VLOG equivalent in | 180 // Libjingle macros which are mapped over to their VLOG equivalent in |
176 // base/logging.h | 181 // base/logging.h |
177 ////////////////////////////////////////////////////////////////////// | 182 ////////////////////////////////////////////////////////////////////// |
178 | 183 |
179 #if defined(LOGGING_INSIDE_LIBJINGLE) | 184 #if defined(LOGGING_INSIDE_LIBJINGLE) |
180 | 185 |
181 #define DIAGNOSTIC_LOG(sev) \ | 186 #define DIAGNOSTIC_LOG(sev) \ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 #define LOG_ERR(sev) LOG_ERRNO(sev) | 231 #define LOG_ERR(sev) LOG_ERRNO(sev) |
227 #define LAST_SYSTEM_ERROR (errno) | 232 #define LAST_SYSTEM_ERROR (errno) |
228 #endif // OS_WIN | 233 #endif // OS_WIN |
229 | 234 |
230 #undef PLOG | 235 #undef PLOG |
231 #define PLOG(sev, err) LOG_ERR_EX(sev, err) | 236 #define PLOG(sev, err) LOG_ERR_EX(sev, err) |
232 | 237 |
233 #endif // LOGGING_INSIDE_LIBJINGLE | 238 #endif // LOGGING_INSIDE_LIBJINGLE |
234 | 239 |
235 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_ | 240 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_ |
OLD | NEW |