From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 186BAA0579;
	Fri,  9 Apr 2021 11:13:06 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id CCAFF407FF;
	Fri,  9 Apr 2021 11:13:05 +0200 (CEST)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com
 [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id D6AF94014D
 for <dev@dpdk.org>; Fri,  9 Apr 2021 11:13:04 +0200 (CEST)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 7E5395C0113;
 Fri,  9 Apr 2021 05:13:02 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Fri, 09 Apr 2021 05:13:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm3; bh=
 SiDIrMlvvyBcSrAZTkBiVFR+d8imuSPz+VX5cIwwMWo=; b=kDvGXJCx4678PfAU
 vx47pAE9yL74xpd6wx389sUez2RzyB+ZvyFy7fQn/HxvnzHbTAsjkmSYt2DCtGT2
 WaNJfF7FA06i6FZJBCubhdK/+cfb8bGYAtsk6C8MRNDtqwbPTwE5FA2NlMTzHZX/
 +2lymmK9ektxYkuw5UN4f6DegP7rqiZ3ld5/zfoJdH217RV3wjg2FgDmKRxeh8DL
 fu1dM243hzifQeZBGh8zFIdzT/2dFP+y/BXEGeqs9N+q+oHbQ1QqA7fA2Cl7RDrs
 eWSSlbWSU0AGspF7hhA1Wx14M3yw37vUUGczjmMbO2jYNQOdGbt40W9QHPdReEmg
 cSzV1g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; bh=SiDIrMlvvyBcSrAZTkBiVFR+d8imuSPz+VX5cIwwM
 Wo=; b=mGZqoy6GeLRgPDJ/mTjMqCtj+H18sYErMElGvE9o9mINXDhxE/dVgpYH2
 hvSXQmmFipxV94uI45Gn/saKJwSVHbGGmvM3iZjbHdzMFiWCAIAbH/wfCIHCWov7
 5pB4LbgSbuhGUU0LLfeCa/ko2rWpIKUJp81IcsZJ66LdNfEqr/x+h0aOVxLfhFiR
 w5vmtfyvMLoTzDIx3NheWWZ2zFLTDU+VnsJ0ZLQ6HKGwWc9AiG/8SwkhLkMP24FX
 0pPykOc6hbWihh1AMjsWlhrqiFbht6EYXksfpruyBXID4DOS/+nBCyPKMetL31G6
 qkbljKEKdgtRvSPC1EP3+QuNUgVmw==
X-ME-Sender: <xms:nRpwYNKFX0GfCE7Buu18DMZX834lMdfT2R9xcanthpTodDsU7QZumg>
 <xme:nRpwYJLCdGlmB7ksyB-9Yk3TSapWjfLK_qld3x7TQobsFRCw07iCePHQvBTuoqsfx
 CQDefYHDIq2sKQGBA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekuddgudefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu
 ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf
 hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl
 ohhnrdhnvght
X-ME-Proxy: <xmx:nRpwYFtcfr9LXzk4yU_GDQ-R53Pa0kL_I8CseU-_63Hcx-_z2Yd_IA>
 <xmx:nRpwYOaAjmKZEpBkdDZ7RHz_kRoBqhoAetyEZaifP_VmCjAoq0X09A>
 <xmx:nRpwYEZKx4LiDA1R_mbpSZ08k-j-3C1nsXEPy_7dDh3lsWL6qMJjFA>
 <xmx:nhpwYDkau5UXO4AYCbctCKXHHpMMe-xH3HZFV51nnRHnrXznzsGu4w>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 9B4A61080054;
 Fri,  9 Apr 2021 05:13:00 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Andrew Rybchenko <arybchenko@solarflare.com>,
 Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>,
 Ilya Maximets <i.maximets@ovn.org>
Date: Fri, 09 Apr 2021 11:12:57 +0200
Message-ID: <2028797.zEveLgizYE@thomas>
In-Reply-To: <CAJFAV8yrYEih2n2eZzDcASqC2RWuTMaZ=6My-GYiNDJ5NgF_sA@mail.gmail.com>
References: <20200626114751.22523-1-david.marchand@redhat.com>
 <20224994.fzTK4MuzM9@thomas>
 <CAJFAV8yrYEih2n2eZzDcASqC2RWuTMaZ=6My-GYiNDJ5NgF_sA@mail.gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v2 2/3] log: track log level changes
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

09/04/2021 11:08, David Marchand:
> On Thu, Apr 8, 2021 at 5:55 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 24/03/2021 11:32, David Marchand:
> > > Add a log message when registering log types and changing log levels.
> > [...]
> > > +             RTE_LOG(DEBUG, EAL, "%s logtype level changed from %s to %s\n",
> >
> > I would prefer "foo log level changed"
> > instead of "foo logtype level changed".
> > Opinions?
> 
> No objection for me.
> 
> 
> >
> > > +                     rte_logs.dynamic_types[type].name == NULL ?
> > > +                             "" : rte_logs.dynamic_types[type].name,
> >
> > In which case the logtype name is undefined?
> 
> The logtype name is strdup().
> When registering static logtypes, this could fail, and we log the
> level change at this point.
> 
> The other path would be to call rte_log_set_level() on those static
> logtypes (there is also the case of the holes in the static logtypes,
> but if users are using them, it sounds like a hack).
> 
> > If it is unexexpected, should we have "unknown" instead of ""?
> 
> We could still register a "unknown" logtype, and then it would be odd :-).
> Empty is clear to me.

OK
Anyway it is unlikely.