Use RTE_LOG_LINE_PREFIX instead of EAL_LOG 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/eal/common/eal_trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/eal/common/eal_trace.h b/lib/eal/common/eal_trace.h index bd082a0..5526267 100644 --- a/lib/eal/common/eal_trace.h +++ b/lib/eal/common/eal_trace.h @@ -16,11 +16,11 @@ #include "eal_private.h" #include "eal_thread.h" -#define trace_err(fmt, args...) \ - EAL_LOG(ERR, "%s():%u " fmt, __func__, __LINE__, ## args) +#define trace_err(...) \ + RTE_LOG_LINE_PREFIX(ERR, EAL, "%s():%u ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__) -#define trace_crit(fmt, args...) \ - EAL_LOG(CRIT, "%s():%u " fmt, __func__, __LINE__, ## args) +#define trace_crit(...) \ + RTE_LOG_LINE_PREFIX(CRIT, EAL, "%s():%u ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__) #define TRACE_CTF_MAGIC 0xC1FC1FC1 #define TRACE_MAX_ARGS 32 -- 1.8.3.1