QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 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 QUICHE_QUIC_PLATFORM_API_QUIC_LOGGING_H_ |
| 6 | #define QUICHE_QUIC_PLATFORM_API_QUIC_LOGGING_H_ |
| 7 | |
| 8 | #include "net/quic/platform/impl/quic_logging_impl.h" |
| 9 | |
| 10 | // Please note following QUIC_LOG are platform dependent: |
| 11 | // INFO severity can be degraded (to VLOG(1) or DVLOG(1)). |
| 12 | // Some platforms may not support QUIC_LOG_FIRST_N or QUIC_LOG_EVERY_N_SEC, and |
| 13 | // they would simply be translated to LOG. |
| 14 | |
| 15 | #define QUIC_DVLOG(verbose_level) QUIC_DVLOG_IMPL(verbose_level) |
| 16 | #define QUIC_DVLOG_IF(verbose_level, condition) \ |
| 17 | QUIC_DVLOG_IF_IMPL(verbose_level, condition) |
| 18 | #define QUIC_DLOG(severity) QUIC_DLOG_IMPL(severity) |
| 19 | #define QUIC_DLOG_IF(severity, condition) QUIC_DLOG_IF_IMPL(severity, condition) |
| 20 | #define QUIC_VLOG(verbose_level) QUIC_VLOG_IMPL(verbose_level) |
| 21 | #define QUIC_LOG(severity) QUIC_LOG_IMPL(severity) |
| 22 | #define QUIC_LOG_FIRST_N(severity, n) QUIC_LOG_FIRST_N_IMPL(severity, n) |
| 23 | #define QUIC_LOG_EVERY_N_SEC(severity, seconds) \ |
| 24 | QUIC_LOG_EVERY_N_SEC_IMPL(severity, seconds) |
| 25 | #define QUIC_LOG_IF(severity, condition) QUIC_LOG_IF_IMPL(severity, condition) |
| 26 | |
| 27 | #define QUIC_PREDICT_FALSE(x) QUIC_PREDICT_FALSE_IMPL(x) |
| 28 | |
| 29 | // This is a noop in release build. |
| 30 | #define QUIC_NOTREACHED() QUIC_NOTREACHED_IMPL() |
| 31 | |
| 32 | #define QUIC_PLOG(severity) QUIC_PLOG_IMPL(severity) |
| 33 | |
| 34 | #define QUIC_DLOG_INFO_IS_ON() QUIC_DLOG_INFO_IS_ON_IMPL() |
| 35 | #define QUIC_LOG_INFO_IS_ON() QUIC_LOG_INFO_IS_ON_IMPL() |
| 36 | #define QUIC_LOG_WARNING_IS_ON() QUIC_LOG_WARNING_IS_ON_IMPL() |
| 37 | #define QUIC_LOG_ERROR_IS_ON() QUIC_LOG_ERROR_IS_ON_IMPL() |
| 38 | |
| 39 | #endif // QUICHE_QUIC_PLATFORM_API_QUIC_LOGGING_H_ |