DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 2/3] log: add ability to match dynamic log based on shell pattern
Date: Mon, 23 Apr 2018 16:59:08 -0700	[thread overview]
Message-ID: <20180423165908.3b1a8db8@xeon-e3> (raw)
In-Reply-To: <3970843.R7zKmtknVI@xps>

On Mon, 23 Apr 2018 23:08:01 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> Hi Stephen,
> 
> 04/04/2018 13:34, Thomas Monjalon:
> > 23/02/2018 22:17, Stephen Hemminger:  
> > > Regular expressions are not the best way to match a hierarchical
> > > pattern like dynamic log levels. And the separator for dynamic
> > > log levels is period which is the regex wildcard character.
> > > 
> > > A better solution is to use filename matching 'globbing' so
> > > that log levels match like file paths. For compatibility,
> > > use colon to separate pattern match style arguments. For
> > > example:
> > > 	--log-level 'pmd.net.virtio.*:debug'
> > > 
> > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > > ---
> > > +int
> > > +rte_log_set_level_match(const char *pattern, uint32_t level)  
> > [...]  
> > > +/* set level by regular expression (using pattern match is preferred) */
> > >  int
> > >  rte_log_set_level_regexp(const char *pattern, uint32_t level)  
> > 
> > I think "pattern" is more appropriate than "match" to differentiate
> > from "regexp". So I suggest this function name:
> > 	rte_log_set_level_pattern  
> 
> Are you OK to do a v3 with this change?
> 
> 

Sure, I expected some feedback since it it was a semantic change in
the API.  Let me also recheck the documentation.

  reply	other threads:[~2018-04-23 23:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 20:56 [dpdk-dev] [PATCH 0/3] logging enhancments Stephen Hemminger
2018-02-23 20:56 ` [dpdk-dev] [PATCH 1/3] eal: allow symbolic log levels Stephen Hemminger
2018-02-23 20:56 ` [dpdk-dev] [PATCH 2/3] log: add ability to match dynamic log based on shell pattern Stephen Hemminger
2018-02-23 20:56 ` [dpdk-dev] [PATCH 3/3] doc: update log level matching in documentation Stephen Hemminger
2018-02-23 21:17 ` [dpdk-dev] [PATCH v2 0/3] logging enhancements Stephen Hemminger
2018-02-23 21:17   ` [dpdk-dev] [PATCH v2 1/3] eal: allow symbolic log levels Stephen Hemminger
2018-02-23 21:17   ` [dpdk-dev] [PATCH v2 2/3] log: add ability to match dynamic log based on shell pattern Stephen Hemminger
2018-04-04 11:34     ` Thomas Monjalon
2018-04-23 21:08       ` Thomas Monjalon
2018-04-23 23:59         ` Stephen Hemminger [this message]
2018-02-23 21:17   ` [dpdk-dev] [PATCH v2 3/3] doc: update log level matching in documentation Stephen Hemminger
2018-04-04 11:32     ` Thomas Monjalon
2018-04-04 11:37   ` [dpdk-dev] [PATCH v2 0/3] logging enhancements Thomas Monjalon
2018-04-23  8:15     ` Olivier Matz

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=20180423165908.3b1a8db8@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).