From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 298FF940A for ; Fri, 13 Nov 2015 14:11:12 +0100 (CET) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 3BBA4C001241; Fri, 13 Nov 2015 13:11:11 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-6-92.ams2.redhat.com [10.36.6.92]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tADDB9C8029602; Fri, 13 Nov 2015 08:11:10 -0500 To: Matthew Hall , dev@dpdk.org References: <1447393802-25736-1-git-send-email-mhall@mhcomputing.net> From: Panu Matilainen Message-ID: <5645E16D.50601@redhat.com> Date: Fri, 13 Nov 2015 15:11:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447393802-25736-1-git-send-email-mhall@mhcomputing.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Subject: Re: [dpdk-dev] [PATCH] rte_log.h: display level in logs from RTE_LOG X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 13:11:12 -0000 On 11/13/2015 07:50 AM, Matthew Hall wrote: > Signed-off-by: Matthew Hall > --- > lib/librte_eal/common/include/rte_log.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h > index ede0dca..be961d0 100644 > --- a/lib/librte_eal/common/include/rte_log.h > +++ b/lib/librte_eal/common/include/rte_log.h > @@ -297,10 +297,10 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap) > * - 0: Success. > * - Negative on error. > */ > -#define RTE_LOG(l, t, ...) \ > - (void)((RTE_LOG_ ## l <= RTE_LOG_LEVEL) ? \ > - rte_log(RTE_LOG_ ## l, \ > - RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) : \ > +#define RTE_LOG(l, t, ...) \ > + (void)((RTE_LOG_ ## l <= RTE_LOG_LEVEL) ? \ > + rte_log(RTE_LOG_ ## l, \ > + RTE_LOGTYPE_ ## t, # t ": " #l ": " __VA_ARGS__) : \ > 0) > > #ifdef __cplusplus > +1 for this, makes it much easier to spot the actually important messages from all the other noise. Both visually and programmatically. - Panu -