DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] eal: fix legacy dynamic logs defaulting to debug
@ 2017-11-16 10:31 Pavan Nikhilesh
  2017-11-16 10:31 ` [dpdk-dev] [PATCH 2/2] eal: fix dynamic logs failing to print Pavan Nikhilesh
  0 siblings, 1 reply; 11+ messages in thread
From: Pavan Nikhilesh @ 2017-11-16 10:31 UTC (permalink / raw)
  To: olivier.matz, thomas; +Cc: dev, Pavan Nikhilesh

Use RTE_LOG_LEVEL instead of RTE_LOG_DEBUG when registering dynamic logs
for legacy modules.

Fixes: c1b5fa94a46f ("eal: support dynamic log types")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 lib/librte_eal/common/eal_common_log.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index e894b75ec..061e96ef9 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -181,8 +181,11 @@ __rte_log_register(const char *name, int id)
 		return -ENOMEM;
 
 	rte_logs.dynamic_types[id].name = dup_name;
-	rte_logs.dynamic_types[id].loglevel = RTE_LOG_DEBUG;
-
+#if RTE_LOG_LEVEL >= RTE_LOG_DEBUG
+	rte_logs.dynamic_types[id].loglevel = RTE_LOG_INFO;
+#else
+	rte_logs.dynamic_types[id].loglevel = RTE_LOG_LEVEL;
+#endif
 	return id;
 }
 
-- 
2.14.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-11-21 18:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16 10:31 [dpdk-dev] [PATCH 1/2] eal: fix legacy dynamic logs defaulting to debug Pavan Nikhilesh
2017-11-16 10:31 ` [dpdk-dev] [PATCH 2/2] eal: fix dynamic logs failing to print Pavan Nikhilesh
2017-11-16 19:48   ` Ferruh Yigit
2017-11-17  8:47     ` Pavan Nikhilesh Bhagavatula
2017-11-20 18:40       ` Ferruh Yigit
2017-11-21  8:30         ` Pavan Nikhilesh Bhagavatula
2017-11-21 10:55         ` Thomas Monjalon
2017-11-21 11:14           ` Pavan Nikhilesh Bhagavatula
2017-11-21 13:30             ` Thomas Monjalon
2017-11-21 14:04               ` Pavan Nikhilesh Bhagavatula
2017-11-21 18:10                 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).