1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2016-2020 Intel Corporation 3 */ 4 5 #ifndef _DLB2_EVDEV_LOG_H_ 6 #define _DLB2_EVDEV_LOG_H_ 7 8 extern int eventdev_dlb2_log_level; 9 #define RTE_LOGTYPE_EVENTDEV_DLB2 eventdev_dlb2_log_level 10 11 /* Dynamic logging */ 12 #define DLB2_LOG_IMPL(level, ...) \ 13 RTE_LOG_LINE_PREFIX(level, EVENTDEV_DLB2, "%s", __func__, __VA_ARGS__) 14 15 #define DLB2_LOG_INFO(fmt, ...) \ 16 DLB2_LOG_IMPL(INFO, fmt, ## __VA_ARGS__) 17 18 #define DLB2_LOG_ERR(fmt, ...) \ 19 DLB2_LOG_IMPL(ERR, fmt, ## __VA_ARGS__) 20 21 /* remove debug logs at compile time unless actually debugging */ 22 #define DLB2_LOG_LINE_DBG(...) \ 23 RTE_LOG_DP_LINE(DEBUG, EVENTDEV_DLB2, __VA_ARGS__) 24 25 #endif /* _DLB2_EVDEV_LOG_H_ */ 26