DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] logging enhancments
@ 2018-02-23 20:56 Stephen Hemminger
  2018-02-23 20:56 ` [dpdk-dev] [PATCH 1/3] eal: allow symbolic log levels Stephen Hemminger
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Stephen Hemminger @ 2018-02-23 20:56 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

The current dynamic logging has some awkward user interface choices.
It uses integers for log levels which requires user to know the
mapping between numeric and symbolic values.

A bigger problem was the choice of regular expressions and option
format for dynamic logging. Dynamic log names are seperated with
a period and the wildcard character for regular expressions is
a period. It is just a happy accident the expressions like:
	"pmd.net.virtio.*"
work as expected. This patch set adds a more usable solution
with filename style matching.

Also, the choice of comma as seperator for log-level option was
not consistent with other options. For other options, comma is
used to seperate list of equal values as in:
	-l 1,2,3
Since new match required a backwards compatiable option the
colon is now used to seperate name and value.

So:
	--log-level='pmd.net.virtio.*,7'
still works as expected. But the prefered syntax is:
	--log-level='pmd.net.virtio.*:info'

If this is accepted, I think we should mark the old regex style
matching as deprecated and remove it in 18.11??

Also, the dynamic log level pattern stuff is not adaquately
documented right now. There are only a couple of vague references
in the current documentation (which this updates).

Stephen Hemminger (3):
  eal: allow symbolic log levels
  log: add ability to match dynamic log based on shell pattern
  doc: update log level matching in documentation

 doc/guides/contributing/coding_style.rst   |  2 +-
 doc/guides/nics/qede.rst                   |  2 +-
 lib/librte_eal/common/eal_common_log.c     | 22 +++++++-
 lib/librte_eal/common/eal_common_options.c | 86 +++++++++++++++++++++++-------
 lib/librte_eal/common/include/rte_log.h    | 16 +++++-
 5 files changed, 103 insertions(+), 25 deletions(-)

-- 
2.16.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-04-23 23:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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