DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/6] eal: fix default log level
@ 2017-04-18 14:22 Olivier Matz
  2017-04-18 14:22 ` [dpdk-dev] [PATCH 2/6] eal: move internal config initialization Olivier Matz
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Olivier Matz @ 2017-04-18 14:22 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, jianfeng.tan, thomas

The initialization of the default log level (from configuration) was
removed by mistake in a previous commit. The global log level was
wrongly set to debug when no --log-level argument was passed. Restore
this initialization.

Before:
  $ ./build/app/test
  RTE>>dump_log_types
  global log level is debug
  ...

After:
  $ ./build/app/test
  RTE>>dump_log_types
  global log level is info
  ...

Fixes: 845afe51e428 ("eal: change specific log levels at startup")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_eal/bsdapp/eal/eal.c   | 1 +
 lib/librte_eal/linuxapp/eal/eal.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index 3b66da6cd..db154db9a 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -324,6 +324,7 @@ eal_log_level_parse(int argc, char **argv)
 	optreset = 1;
 
 	eal_reset_internal_config(&internal_config);
+	rte_log_set_global_level(internal_config.log_level);
 
 	while ((opt = getopt_long(argc, argvopt, eal_short_options,
 				  eal_long_options, &option_index)) != EOF) {
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index f3fbeb9c7..b2758799c 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -493,6 +493,7 @@ eal_log_level_parse(int argc, char **argv)
 	optind = 1;
 
 	eal_reset_internal_config(&internal_config);
+	rte_log_set_global_level(internal_config.log_level);
 
 	while ((opt = getopt_long(argc, argvopt, eal_short_options,
 				  eal_long_options, &option_index)) != EOF) {
-- 
2.11.0

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

end of thread, other threads:[~2017-04-19 23:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 14:22 [dpdk-dev] [PATCH 1/6] eal: fix default log level Olivier Matz
2017-04-18 14:22 ` [dpdk-dev] [PATCH 2/6] eal: move internal config initialization Olivier Matz
2017-04-18 14:22 ` [dpdk-dev] [PATCH 3/6] eal: remove log level from internal config Olivier Matz
2017-04-18 15:00   ` Ferruh Yigit
2017-04-18 15:26     ` Olivier MATZ
2017-04-18 15:28       ` Ferruh Yigit
2017-04-18 14:22 ` [dpdk-dev] [PATCH 4/6] eal: remove undue printf Olivier Matz
2017-04-18 14:22 ` [dpdk-dev] [PATCH 5/6] eal: fix log level regexp matching Olivier Matz
2017-04-18 14:22 ` [dpdk-dev] [PATCH 6/6] eal: fix dump of registered logs when disabled Olivier Matz
2017-04-18 15:29 ` [dpdk-dev] [PATCH 1/6] eal: fix default log level Ferruh Yigit
2017-04-19 23:31   ` Thomas Monjalon

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).