From: Stephen Hemminger <stephen@networkplumber.org>
To: Panu Matilainen <pmatilai@redhat.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] rte_log.h: display level in logs from RTE_LOG
Date: Fri, 13 Nov 2015 08:41:43 -0800 [thread overview]
Message-ID: <20151113084143.509908b0@xeon-e3> (raw)
In-Reply-To: <5645E16D.50601@redhat.com>
On Fri, 13 Nov 2015 15:11:09 +0200
Panu Matilainen <pmatilai@redhat.com> wrote:
> On 11/13/2015 07:50 AM, Matthew Hall wrote:
> > Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
> > ---
> > 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.
next prev parent reply other threads:[~2015-11-13 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-13 5:50 Matthew Hall
2015-11-13 13:11 ` Panu Matilainen
2015-11-13 16:41 ` Stephen Hemminger [this message]
2015-11-13 19:18 ` Matthew Hall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151113084143.509908b0@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=pmatilai@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).