From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 9AF79255 for ; Mon, 20 Nov 2017 19:40:31 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2017 10:40:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,429,1505804400"; d="scan'208";a="3977706" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.6]) ([10.241.225.6]) by FMSMGA003.fm.intel.com with ESMTP; 20 Nov 2017 10:40:29 -0800 To: Pavan Nikhilesh Bhagavatula , olivier.matz@6wind.com, thomas@monjalon.net Cc: dev@dpdk.org References: <20171116103144.4197-1-pbhagavatula@caviumnetworks.com> <20171116103144.4197-2-pbhagavatula@caviumnetworks.com> <81bb5aae-527d-5b1a-5609-985256682d39@intel.com> <20171117084722.by7sdxdoimkwdqpg@Pavan-LT> From: Ferruh Yigit Message-ID: <9e17df24-9b52-620f-b299-fdc42a1083c4@intel.com> Date: Mon, 20 Nov 2017 10:40:29 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171117084722.by7sdxdoimkwdqpg@Pavan-LT> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 2/2] eal: fix dynamic logs failing to print X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2017 18:40:32 -0000 On 11/17/2017 12:47 AM, Pavan Nikhilesh Bhagavatula wrote: > On Thu, Nov 16, 2017 at 11:48:14AM -0800, Ferruh Yigit wrote: >> On 11/16/2017 2:31 AM, Pavan Nikhilesh wrote: >>> Dynamic logs fail to print if the global log level is less than dynamic >>> loglevel. Example if the global log level is set to INFO and dynamic log >>> level for a specific module is set to DEBUG then the log fails to print. >> >> What is the purpose of the global log level value? >> > > As per my understanding, If we want to filter out debug logs from all other > modules except a specific module using --log-level="," the logs > would fail to print if the global log level is lower than the specified level. Yes. > > If during EAL init we want to filter out all the logs except a certain pmd's > log we can specify --log-level="pmd\..*," without modifying the global > log level. Also, this wouldnt break the previous functionality of global log > level. But this overwrites the global and makes it useless. Lets say global log level is set to "critical" (3), if module set something bigger like "info" (7) that will set the limit, so module will be controlling and what is the point of having global level? It can be an option remove global level completely and let modules control what to log, but I believe it can be useful to have a global control. What about having a verbose global and limited module log levels: global default: debug (8) modules default: info (7) so if you want get verbose log from specific module: --log-level=",8" for globally less verbose log: --log-level=3 But this makes hard to enable verbose log from everything, although not sure how practical is this. For this one it can be possible to have a new API to set modules other than given one, like: --log-level="eal,-4" --> set level of all modules except "eal" to "error" (4) Also I believe it is possible to remove RTE_LOG_LEVEL config option completely since dynamic debug exist now. Previously it was good to have because it was used to compile out debug functions in data path, now there is "RTE_LOG_DP_LEVEL" for that purpose, so it can be possible to remove RTE_LOG_LEVEL and in rte_log_init() set to DEBUG by default if you agree with above approach. And, since you are touching these files :), for better regex support, it may be good to have log types hierarchical, like "lib.mbuf", "lib.mempool", "lib.eal.malloc", as done in member library but with "lib" prefix instead of "librte", if this makes sense and you have time would you mind sending a patch for this as well? Thanks, ferruh > >>> Check modules log level before checking the global log level. >>> >>> Fixes: c1b5fa94a46f ("eal: support dynamic log types") >>> >>> Signed-off-by: Pavan Nikhilesh >> >> <...> >>