DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] dynamic log level syntax
@ 2018-02-21  1:16 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2018-02-21  1:16 UTC (permalink / raw)
  To: dev

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-21  1:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21  1:16 [dpdk-dev] dynamic log level syntax Stephen Hemminger

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).