From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by dpdk.org (Postfix) with ESMTP id C8ED395DE for ; Fri, 13 Nov 2015 17:41:32 +0100 (CET) Received: by pasz6 with SMTP id z6so108307976pas.2 for ; Fri, 13 Nov 2015 08:41:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber_org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=dc7n1BkgLgiP3/XEPFGksvyGJYpIFwPrqU43oO+n5ZY=; b=sc8Gaty3fLbNG19+PrabBWFO2iX15LlZexUos1R6E0/evgi87hrvUc4fj/i8bj/aCk y6X/TM77pF7TD+klRUyLLo/5p9r0DVjUWBj0S2wjtArSvcZhDfhRsI9gQJZNl2lPkioi 6onQfBs1ArkMwlksIoIKo5baG6TMbLZ0NUU5K7HF/CcRBr5uMnXzIrIVvUpysWpZ+EXo 7VqZxKs+nn/MF0R93eR5UOlFQmkNuv9+9JYO3SWSkLE3hN22QMHXrXaEGZ3Adw8pTJiJ Nmu2jzbT5onUSeJhIIsGCQYjN1XhgRWCu0Uy2AgVYbmcn7CgFnNWRrHwLp3dbm7xZW+V Ewbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=dc7n1BkgLgiP3/XEPFGksvyGJYpIFwPrqU43oO+n5ZY=; b=Es0c6cEa0rjPmPUHehNW71eihcBv+gSLneO9E46pPN7YYotWr9cVS6b1x2HwcF3lIk kdCB8Gzx+wvlh7zjMk/fCsdHJkoM6CFSCnQGHg7+TxFTR6CBS272vkX1Qef46NSBbQWb BrcZM0rSsb1Lbyn7zzgUmpybgcsTGQqATlGKi9GdRwTQZGwVIuFijArGt0QDF0kexhbV ipzbNQHm1MipL5+ZzmM7112zm5dBso7a4DC5Nu+HX9N0BIN6apuO9DQizs9GkT+S+pvN iEH6h4P241QGmyQsNiXqMjNAO20vx9yOhKgeDSbKREPP6c7NkozJKotLmEvqsNS0iPMI Cp8w== X-Gm-Message-State: ALoCoQlPujpsl6DH6B8E+1pJv0f9AmJeQDYS9tTmw/BfxPx4TjDTv64icC+lUJ0jCBaC3WRW7Udd X-Received: by 10.66.216.7 with SMTP id om7mr26980300pac.90.1447432892127; Fri, 13 Nov 2015 08:41:32 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id x15sm12329940pbt.38.2015.11.13.08.41.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Nov 2015 08:41:31 -0800 (PST) Date: Fri, 13 Nov 2015 08:41:43 -0800 From: Stephen Hemminger To: Panu Matilainen Message-ID: <20151113084143.509908b0@xeon-e3> In-Reply-To: <5645E16D.50601@redhat.com> References: <1447393802-25736-1-git-send-email-mhall@mhcomputing.net> <5645E16D.50601@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org 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 16:41:33 -0000 On Fri, 13 Nov 2015 15:11:09 +0200 Panu Matilainen wrote: > 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 - -1 This is already done by syslog and friends and adds more cruft to log messages.