DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, jianfeng.tan@intel.com, thomas@monjalon.net
Subject: [dpdk-dev] [PATCH 1/6] eal: fix default log level
Date: Tue, 18 Apr 2017 16:22:20 +0200	[thread overview]
Message-ID: <20170418142225.6308-1-olivier.matz@6wind.com> (raw)

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

             reply	other threads:[~2017-04-18 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 14:22 Olivier Matz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170418142225.6308-1-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jianfeng.tan@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).