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 <roretzla@linux.microsoft.com>
---
lib/eal/common/eal_trace.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
@@ -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