[dpdk-dev] eal: fix wrong log at startup

Message ID 1485274872-9377-1-git-send-email-olivier.matz@6wind.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Olivier Matz Jan. 24, 2017, 4:21 p.m. UTC
  The log "Debug logs available - lower performance" should
now only be displayed when dataplane debug logs are enabled.

The issue occurs only if the default log level (CONFIG_RTE_LOG_LEVEL) is
set to DEBUG in the configuration, which is not the case by default.

Fixes: 5d8f0baf69ea ("log: do not drop debug logs at compile time")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_eal/common/eal_common_log.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon Jan. 29, 2017, 9:57 p.m. UTC | #1
2017-01-24 17:21, Olivier Matz:
> The log "Debug logs available - lower performance" should
> now only be displayed when dataplane debug logs are enabled.
> 
> The issue occurs only if the default log level (CONFIG_RTE_LOG_LEVEL) is
> set to DEBUG in the configuration, which is not the case by default.
> 
> Fixes: 5d8f0baf69ea ("log: do not drop debug logs at compile time")
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index e45d326..2197558 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -176,7 +176,8 @@  eal_log_set_default(FILE *default_log)
 {
 	default_log_stream = default_log;
 
-#if RTE_LOG_LEVEL >= RTE_LOG_DEBUG
-	RTE_LOG(NOTICE, EAL, "Debug logs available - lower performance\n");
+#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
+	RTE_LOG(NOTICE, EAL,
+		"Debug dataplane logs available - lower performance\n");
 #endif
 }