Use RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansions which allow a prefix and arguments to be inserted into the log line without the need to use the ## args variadic argument pack extension.
Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> --- lib/metrics/rte_metrics_telemetry.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c index b8c9d75..dc43611 100644 --- a/lib/metrics/rte_metrics_telemetry.c +++ b/lib/metrics/rte_metrics_telemetry.c @@ -19,14 +19,14 @@ #define RTE_LOGTYPE_METRICS metrics_log_level /* Logging Macros */ -#define METRICS_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, METRICS, "%s(): "fmt, __func__, ## args) +#define METRICS_LOG(level, ...) \ + RTE_LOG_LINE_PREFIX(level, METRICS, "%s(): ", __func__, __VA_ARGS__) -#define METRICS_LOG_ERR(fmt, args...) \ - METRICS_LOG(ERR, fmt, ## args) +#define METRICS_LOG_ERR(...) \ + METRICS_LOG(ERR, __VA_ARGS__) -#define METRICS_LOG_WARN(fmt, args...) \ - METRICS_LOG(WARNING, fmt, ## args) +#define METRICS_LOG_WARN(...) \ + METRICS_LOG(WARNING, __VA_ARGS__) static int32_t rte_metrics_tel_reg_port_ethdev_to_metrics(uint16_t port_id) -- 1.8.3.1