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_COMMON_PLATFORM_API_QUICHE_LOGGING_H_ 6 #define QUICHE_COMMON_PLATFORM_API_QUICHE_LOGGING_H_ 7 8 #include "net/quiche/common/platform/impl/quiche_logging_impl.h" 9 10 // Please note following QUICHE_LOG are platform dependent: 11 // INFO severity can be degraded (to VLOG(1) or DVLOG(1)). 12 // Some platforms may not support QUICHE_LOG_FIRST_N or QUICHE_LOG_EVERY_N_SEC, 13 // and they would simply be translated to LOG. 14 15 #define QUICHE_DVLOG(verbose_level) QUICHE_DVLOG_IMPL(verbose_level) 16 #define QUICHE_DVLOG_IF(verbose_level, condition) \ 17 QUICHE_DVLOG_IF_IMPL(verbose_level, condition) 18 #define QUICHE_DLOG(severity) QUICHE_DLOG_IMPL(severity) 19 #define QUICHE_DLOG_IF(severity, condition) \ 20 QUICHE_DLOG_IF_IMPL(severity, condition) 21 #define QUICHE_VLOG(verbose_level) QUICHE_VLOG_IMPL(verbose_level) 22 #define QUICHE_LOG(severity) QUICHE_LOG_IMPL(severity) 23 #define QUICHE_LOG_FIRST_N(severity, n) QUICHE_LOG_FIRST_N_IMPL(severity, n) 24 #define QUICHE_LOG_EVERY_N_SEC(severity, seconds) \ 25 QUICHE_LOG_EVERY_N_SEC_IMPL(severity, seconds) 26 #define QUICHE_LOG_IF(severity, condition) \ 27 QUICHE_LOG_IF_IMPL(severity, condition) 28 29 #define QUICHE_PREDICT_FALSE(x) QUICHE_PREDICT_FALSE_IMPL(x) 30 #define QUICHE_PREDICT_TRUE(x) QUICHE_PREDICT_TRUE_IMPL(x) 31 32 // This is a noop in release build. 33 #define QUICHE_NOTREACHED() QUICHE_NOTREACHED_IMPL() 34 35 #define QUICHE_PLOG(severity) QUICHE_PLOG_IMPL(severity) 36 37 #define QUICHE_DLOG_INFO_IS_ON() QUICHE_DLOG_INFO_IS_ON_IMPL() 38 #define QUICHE_LOG_INFO_IS_ON() QUICHE_LOG_INFO_IS_ON_IMPL() 39 #define QUICHE_LOG_WARNING_IS_ON() QUICHE_LOG_WARNING_IS_ON_IMPL() 40 #define QUICHE_LOG_ERROR_IS_ON() QUICHE_LOG_ERROR_IS_ON_IMPL() 41 42 #endif // QUICHE_COMMON_PLATFORM_API_QUICHE_LOGGING_H_ 43