| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 LOG_SEVERITY_PRECONDITION(webrtc::sev) \ | 124 LOG_SEVERITY_PRECONDITION(webrtc::sev) \ |
| 125 webrtc::LogMessage(__FILE__, __LINE__, webrtc::sev).stream() | 125 webrtc::LogMessage(__FILE__, __LINE__, webrtc::sev).stream() |
| 126 | 126 |
| 127 // The _V version is for when a variable is passed in. It doesn't do the | 127 // The _V version is for when a variable is passed in. It doesn't do the |
| 128 // namespace concatination. | 128 // namespace concatination. |
| 129 #define LOG_V(sev) \ | 129 #define LOG_V(sev) \ |
| 130 LOG_SEVERITY_PRECONDITION(sev) \ | 130 LOG_SEVERITY_PRECONDITION(sev) \ |
| 131 webrtc::LogMessage(__FILE__, __LINE__, sev).stream() | 131 webrtc::LogMessage(__FILE__, __LINE__, sev).stream() |
| 132 | 132 |
| 133 // The _F version prefixes the message with the current function name. | 133 // The _F version prefixes the message with the current function name. |
| 134 #if (defined(__GNUC__) && defined(_DEBUG)) || defined(WANT_PRETTY_LOG_F) | 134 #if (defined(__GNUC__) && !defined(NDEBUG)) || defined(WANT_PRETTY_LOG_F) |
| 135 #define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " | 135 #define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " |
| 136 #else | 136 #else |
| 137 #define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " | 137 #define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " |
| 138 #endif | 138 #endif |
| 139 | 139 |
| 140 #define LOG_API0() LOG_F(LS_VERBOSE) | 140 #define LOG_API0() LOG_F(LS_VERBOSE) |
| 141 #define LOG_API1(v1) LOG_API0() << #v1 << "=" << v1 | 141 #define LOG_API1(v1) LOG_API0() << #v1 << "=" << v1 |
| 142 #define LOG_API2(v1, v2) LOG_API1(v1) \ | 142 #define LOG_API2(v1, v2) LOG_API1(v1) \ |
| 143 << ", " << #v2 << "=" << v2 | 143 << ", " << #v2 << "=" << v2 |
| 144 #define LOG_API3(v1, v2, v3) LOG_API2(v1, v2) \ | 144 #define LOG_API3(v1, v2, v3) LOG_API2(v1, v2) \ |
| 145 << ", " << #v3 << "=" << v3 | 145 << ", " << #v3 << "=" << v3 |
| 146 | 146 |
| 147 #define LOG_FERR0(sev, func) LOG(sev) << #func << " failed" | 147 #define LOG_FERR0(sev, func) LOG(sev) << #func << " failed" |
| 148 #define LOG_FERR1(sev, func, v1) LOG_FERR0(sev, func) \ | 148 #define LOG_FERR1(sev, func, v1) LOG_FERR0(sev, func) \ |
| 149 << ": " << #v1 << "=" << v1 | 149 << ": " << #v1 << "=" << v1 |
| 150 #define LOG_FERR2(sev, func, v1, v2) LOG_FERR1(sev, func, v1) \ | 150 #define LOG_FERR2(sev, func, v1, v2) LOG_FERR1(sev, func, v1) \ |
| 151 << ", " << #v2 << "=" << v2 | 151 << ", " << #v2 << "=" << v2 |
| 152 #define LOG_FERR3(sev, func, v1, v2, v3) LOG_FERR2(sev, func, v1, v2) \ | 152 #define LOG_FERR3(sev, func, v1, v2, v3) LOG_FERR2(sev, func, v1, v2) \ |
| 153 << ", " << #v3 << "=" << v3 | 153 << ", " << #v3 << "=" << v3 |
| 154 #define LOG_FERR4(sev, func, v1, v2, v3, v4) LOG_FERR3(sev, func, v1, v2, v3) \ | 154 #define LOG_FERR4(sev, func, v1, v2, v3, v4) LOG_FERR3(sev, func, v1, v2, v3) \ |
| 155 << ", " << #v4 << "=" << v4 | 155 << ", " << #v4 << "=" << v4 |
| 156 | 156 |
| 157 #endif // LOG | 157 #endif // LOG |
| 158 | 158 |
| 159 } // namespace webrtc | 159 } // namespace webrtc |
| 160 | 160 |
| 161 #endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_LOGGING_H_ | 161 #endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_LOGGING_H_ |
| OLD | NEW |