Libraries should not reuse RTE_LOGTYPE_USER1 for their
logging. Instead they should register their own type.

Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
Cc: reshma.pat...@intel.com
Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 lib/latencystats/rte_latencystats.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/latencystats/rte_latencystats.c 
b/lib/latencystats/rte_latencystats.c
index 8985a377db4e..f3c1746cca00 100644
--- a/lib/latencystats/rte_latencystats.c
+++ b/lib/latencystats/rte_latencystats.c
@@ -26,7 +26,8 @@ latencystat_cycles_per_ns(void)
 }
 
 /* Macros for printing using RTE_LOG */
-#define RTE_LOGTYPE_LATENCY_STATS RTE_LOGTYPE_USER1
+RTE_LOG_REGISTER_DEFAULT(latencystat_logtype, INFO);
+#define RTE_LOGTYPE_LATENCY_STATS latencystat_logtype
 
 static uint64_t timestamp_dynflag;
 static int timestamp_dynfield_offset = -1;
-- 
2.39.1

Reply via email to