1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2016-2020 Intel Corporation 3 */ 4 5 #ifndef _DLB_EVDEV_LOG_H_ 6 #define _DLB_EVDEV_LOG_H_ 7 8 extern int eventdev_dlb_log_level; 9 10 /* Dynamic logging */ 11 #define DLB_LOG_IMPL(level, fmt, args...) \ 12 rte_log(RTE_LOG_ ## level, eventdev_dlb_log_level, "%s" fmt "\n", \ 13 __func__, ##args) 14 15 #define DLB_LOG_INFO(fmt, args...) \ 16 DLB_LOG_IMPL(INFO, fmt, ## args) 17 18 #define DLB_LOG_ERR(fmt, args...) \ 19 DLB_LOG_IMPL(ERR, fmt, ## args) 20 21 /* remove debug logs at compile time unless actually debugging */ 22 #define DLB_LOG_DBG(fmt, args...) \ 23 RTE_LOG_DP(DEBUG, PMD, fmt, ## args) 24 25 #endif /* _DLB_EVDEV_LOG_H_ */ 26