From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: dynamic log level syntax Date: Tue, 20 Feb 2018 17:16:11 -0800 Message-ID: <20180220171611.7a430046@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: dev@dpdk.org Return-path: Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id 6FF2911D4 for ; Wed, 21 Feb 2018 02:16:16 +0100 (CET) Received: by mail-pf0-f179.google.com with SMTP id c143so18174pfb.6 for ; Tue, 20 Feb 2018 17:16:16 -0800 (PST) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id 186sm59456760pfe.2.2018.02.20.17.16.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2018 17:16:15 -0800 (PST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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.