| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 void InitDiagnosticLoggingDelegateFunction( | 154 void InitDiagnosticLoggingDelegateFunction( |
| 155 void (*delegate)(const std::string&)); | 155 void (*delegate)(const std::string&)); |
| 156 | 156 |
| 157 void SetExtraLoggingInit( |
| 158 void (*function)(void (*delegate)(const std::string&))); |
| 157 } // namespace talk_base | 159 } // namespace talk_base |
| 158 | 160 |
| 159 ////////////////////////////////////////////////////////////////////// | 161 ////////////////////////////////////////////////////////////////////// |
| 160 // Libjingle macros which are mapped over to their VLOG equivalent in | 162 // Libjingle macros which are mapped over to their VLOG equivalent in |
| 161 // base/logging.h | 163 // base/logging.h |
| 162 ////////////////////////////////////////////////////////////////////// | 164 ////////////////////////////////////////////////////////////////////// |
| 163 | 165 |
| 164 #if defined(LOGGING_INSIDE_LIBJINGLE) | 166 #if defined(LOGGING_INSIDE_LIBJINGLE) |
| 165 | 167 |
| 166 #define DIAGNOSTIC_LOG(sev, ctx, err, ...) \ | 168 #define DIAGNOSTIC_LOG(sev, ctx, err, ...) \ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 #define LOG_ERR(sev) LOG_ERRNO(sev) | 204 #define LOG_ERR(sev) LOG_ERRNO(sev) |
| 203 #define LAST_SYSTEM_ERROR (errno) | 205 #define LAST_SYSTEM_ERROR (errno) |
| 204 #endif // OS_WIN | 206 #endif // OS_WIN |
| 205 | 207 |
| 206 #undef PLOG | 208 #undef PLOG |
| 207 #define PLOG(sev, err) LOG_ERR_EX(sev, err) | 209 #define PLOG(sev, err) LOG_ERR_EX(sev, err) |
| 208 | 210 |
| 209 #endif // LOGGING_INSIDE_LIBJINGLE | 211 #endif // LOGGING_INSIDE_LIBJINGLE |
| 210 | 212 |
| 211 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_ | 213 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_TALK_BASE_LOGGING_H_ |
| OLD | NEW |