numam-dpdk/drivers/event/sw/sw_evdev_log.h
Harry van Haaren 510ac6f4f0 event/sw: support dynamic logging
This commit enables dynamic logging with the SW pmd.
The string "pmd.event.sw" is used to change the verbosity
of the logging output, as per the newly defined log naming.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-31 10:11:48 +01:00

24 lines
542 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2018 Intel Corporation
*/
#ifndef _SW_EVDEV_LOG_H_
#define _SW_EVDEV_LOG_H_
extern int eventdev_sw_log_level;
#define SW_LOG_IMPL(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, eventdev_sw_log_level, "%s" fmt "\n", \
__func__, ##args)
#define SW_LOG_INFO(fmt, args...) \
SW_LOG_IMPL(INFO, fmt, ## args)
#define SW_LOG_DBG(fmt, args...) \
SW_LOG_IMPL(DEBUG, fmt, ## args)
#define SW_LOG_ERR(fmt, args...) \
SW_LOG_IMPL(ERR, fmt, ## args)
#endif /* _SW_EVDEV_LOG_H_ */