[dpdk-dev] [PATCH v2 0/3] logging enhancements

Olivier Matz olivier.matz at 6wind.com
Mon Apr 23 10:15:08 CEST 2018


On Wed, Apr 04, 2018 at 01:37:37PM +0200, Thomas Monjalon wrote:
> 23/02/2018 22:17, 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'
> 
> +1
> This syntax looks better.

Agree, this is easier to use and understand.



More information about the dev mailing list