blob: 5ca7b6620e998536a708a9e78453eca787ebe1b4 [file] [log] [blame]
Damjan Marion38c61912023-10-17 16:06:26 +00001/* SPDX-License-Identifier: Apache-2.0
2 * Copyright (c) 2023 Cisco Systems, Inc.
3 */
4
5#ifndef _VNET_DEV_LOG_H_
6#define _VNET_DEV_LOG_H_
7
Damjan Marion38c61912023-10-17 16:06:26 +00008#define log_debug(dev, f, ...) \
9 vlib_log (VLIB_LOG_LEVEL_DEBUG, dev_log.class, "%U" f, format_vnet_dev_log, \
Damjan Marion6bd6c802023-11-02 18:40:32 +000010 dev, clib_string_skip_prefix (__func__, "vnet_dev_"), \
11 ##__VA_ARGS__)
Damjan Marion38c61912023-10-17 16:06:26 +000012#define log_notice(dev, f, ...) \
13 vlib_log (VLIB_LOG_LEVEL_NOTICE, dev_log.class, "%U" f, \
14 format_vnet_dev_log, dev, 0, ##__VA_ARGS__)
15#define log_warn(dev, f, ...) \
16 vlib_log (VLIB_LOG_LEVEL_WARNING, dev_log.class, "%U" f, \
17 format_vnet_dev_log, dev, 0, ##__VA_ARGS__)
18#define log_err(dev, f, ...) \
19 vlib_log (VLIB_LOG_LEVEL_ERR, dev_log.class, "%U" f, format_vnet_dev_log, \
20 dev, 0, ##__VA_ARGS__)
21
22#endif /* _VNET_DEV_LOG_H_ */