Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_LOGGING_IMPL_H_ | |
| 6 #define NET_QUIC_PLATFORM_IMPL_QUIC_LOGGING_IMPL_H_ | |
| 7 | |
| 8 #include "base/logging.h" | |
| 9 | |
| 10 #define QUIC_LOG_IMPL(severity) QUIC_DLOG(severity) | |
| 11 #define QUIC_LOG_EVERY_N_SEC_IMPL(severity, seconds) QUIC_DLOG(severity) | |
| 12 #define QUIC_LOG_FIRST_N_IMPL(severity, n) QUIC_DLOG(severity) | |
|
Ryan Hamilton
2017/01/05 15:44:55
I'm confused by these 3 lines. api/logging.h depen
| |
| 13 #define QUIC_DLOG_IMPL(severity) QUIC_CHROMIUM_DLOG_##severity | |
| 14 #define QUIC_LOG_IF_IMPL(severity, condition) \ | |
| 15 QUIC_CHROMIUM_LOG_IF_##severity(condition) | |
| 16 | |
| 17 #define QUIC_CHROMIUM_DLOG_INFO DVLOG(1) | |
| 18 #define QUIC_CHROMIUM_DLOG_WARNING DLOG(WARNING) | |
| 19 #define QUIC_CHROMIUM_DLOG_ERROR DLOG(ERROR) | |
| 20 #define QUIC_CHROMIUM_DLOG_FATAL DLOG(FATAL) | |
| 21 #define QUIC_CHROMIUM_DLOG_DFATAL DLOG(DFATAL) | |
| 22 | |
| 23 #define QUIC_CHROMIUM_LOG_IF_INFO(condition) DVLOG_IF(1, condition) | |
| 24 #define QUIC_CHROMIUM_LOG_IF_WARNING(condition) DLOG_IF(WARNING, condition) | |
| 25 #define QUIC_CHROMIUM_LOG_IF_ERROR(condition) DLOG_IF(ERROR, condition) | |
| 26 #define QUIC_CHROMIUM_LOG_IF_FATAL(condition) DLOG_IF(FATAL, condition) | |
| 27 #define QUIC_CHROMIUM_LOG_IF_DFATAL(condition) DLOG_IF(DFATAL, condition) | |
| 28 | |
| 29 #define QUIC_DVLOG_IMPL(verbose_level) DVLOG(verbose_level) | |
| 30 | |
| 31 #if defined(OS_WIN) | |
| 32 // wingdi.h defines ERROR to be 0. When we call QUIC_DLOG(ERROR), it gets | |
| 33 // substituted with 0, and it expands to QUIC_CHROMIUM_DLOG_0. To allow us to | |
| 34 // keep using this syntax, we define this macro to do the same thing as | |
| 35 // QUIC_CHROMIUM_DLOG_ERROR. | |
| 36 #define QUIC_CHROMIUM_DLOG_0 QUIC_CHROMIUM_DLOG_ERROR | |
| 37 #define QUIC_CHROMIUM_LOG_IF_0 QUIC_CHROMIUM_LOG_IF_ERROR | |
| 38 #endif | |
| 39 | |
| 40 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_LOGGING_IMPL_H_ | |
| OLD | NEW |