Damjan Marion | 38c6191 | 2023-10-17 16:06:26 +0000 | [diff] [blame^] | 1 | /* 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 | |
| 8 | format_function_t format_vnet_dev_log; |
| 9 | |
| 10 | #define log_debug(dev, f, ...) \ |
| 11 | vlib_log (VLIB_LOG_LEVEL_DEBUG, dev_log.class, "%U" f, format_vnet_dev_log, \ |
| 12 | dev, __func__, ##__VA_ARGS__) |
| 13 | #define log_notice(dev, f, ...) \ |
| 14 | vlib_log (VLIB_LOG_LEVEL_NOTICE, dev_log.class, "%U" f, \ |
| 15 | format_vnet_dev_log, dev, 0, ##__VA_ARGS__) |
| 16 | #define log_warn(dev, f, ...) \ |
| 17 | vlib_log (VLIB_LOG_LEVEL_WARNING, dev_log.class, "%U" f, \ |
| 18 | format_vnet_dev_log, dev, 0, ##__VA_ARGS__) |
| 19 | #define log_err(dev, f, ...) \ |
| 20 | vlib_log (VLIB_LOG_LEVEL_ERR, dev_log.class, "%U" f, format_vnet_dev_log, \ |
| 21 | dev, 0, ##__VA_ARGS__) |
| 22 | |
| 23 | #endif /* _VNET_DEV_LOG_H_ */ |