From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] dynamic log level syntax
Date: Tue, 20 Feb 2018 17:16:11 -0800 [thread overview]
Message-ID: <20180220171611.7a430046@xeon-e3> (raw)
After using dynamic logging for a while, I think there was a poor design choice
on using regular expressions to match logging string. The naming policy looks
like a hierarchy and the matching is with regular expressions. For most other
applications where a hierarchy is implied, a globbing rather than regular
expression match is used.
Instead of current regex based
--log-level="pmd\.net\.i40e\..*"
Globbing would use
--log-level="pmd.net.i40e.*"
Part of the problem as well with current choice is that seperator
(period) is also the regular expression match any character value.
Glibc doesn't have an easy to use version of this matching.
The only close function is fnmatch and it wants slash for separator.
Unfortunately, changing the syntax now would be an API nuisance.
Some of the examples in the current documentation are unclear or
incorrect on this.
reply other threads:[~2018-02-21 1:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180220171611.7a430046@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/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).