OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 LOG_SEVERITY_PRECONDITION(rtc::sev) \ | 278 LOG_SEVERITY_PRECONDITION(rtc::sev) \ |
279 rtc::LogMessage(__FILE__, __LINE__, rtc::sev).stream() | 279 rtc::LogMessage(__FILE__, __LINE__, rtc::sev).stream() |
280 | 280 |
281 // The _V version is for when a variable is passed in. It doesn't do the | 281 // The _V version is for when a variable is passed in. It doesn't do the |
282 // namespace concatination. | 282 // namespace concatination. |
283 #define LOG_V(sev) \ | 283 #define LOG_V(sev) \ |
284 LOG_SEVERITY_PRECONDITION(sev) \ | 284 LOG_SEVERITY_PRECONDITION(sev) \ |
285 rtc::LogMessage(__FILE__, __LINE__, sev).stream() | 285 rtc::LogMessage(__FILE__, __LINE__, sev).stream() |
286 | 286 |
287 // The _F version prefixes the message with the current function name. | 287 // The _F version prefixes the message with the current function name. |
288 #if (defined(__GNUC__) && defined(_DEBUG)) || defined(WANT_PRETTY_LOG_F) | 288 #if (defined(__GNUC__) && !defined(NDEBUG)) || defined(WANT_PRETTY_LOG_F) |
289 #define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " | 289 #define LOG_F(sev) LOG(sev) << __PRETTY_FUNCTION__ << ": " |
290 #define LOG_T_F(sev) LOG(sev) << this << ": " << __PRETTY_FUNCTION__ << ": " | 290 #define LOG_T_F(sev) LOG(sev) << this << ": " << __PRETTY_FUNCTION__ << ": " |
291 #else | 291 #else |
292 #define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " | 292 #define LOG_F(sev) LOG(sev) << __FUNCTION__ << ": " |
293 #define LOG_T_F(sev) LOG(sev) << this << ": " << __FUNCTION__ << ": " | 293 #define LOG_T_F(sev) LOG(sev) << this << ": " << __FUNCTION__ << ": " |
294 #endif | 294 #endif |
295 | 295 |
296 #define LOG_CHECK_LEVEL(sev) \ | 296 #define LOG_CHECK_LEVEL(sev) \ |
297 rtc::LogCheckLevel(rtc::sev) | 297 rtc::LogCheckLevel(rtc::sev) |
298 #define LOG_CHECK_LEVEL_V(sev) \ | 298 #define LOG_CHECK_LEVEL_V(sev) \ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 #define PLOG(sev, err) \ | 351 #define PLOG(sev, err) \ |
352 LOG_ERR_EX(sev, err) | 352 LOG_ERR_EX(sev, err) |
353 | 353 |
354 // TODO(?): Add an "assert" wrapper that logs in the same manner. | 354 // TODO(?): Add an "assert" wrapper that logs in the same manner. |
355 | 355 |
356 #endif // LOG | 356 #endif // LOG |
357 | 357 |
358 } // namespace rtc | 358 } // namespace rtc |
359 | 359 |
360 #endif // WEBRTC_BASE_LOGGING_H_ | 360 #endif // WEBRTC_BASE_LOGGING_H_ |
OLD | NEW |