From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id CF55B5B3E for ; Fri, 23 Feb 2018 22:18:03 +0100 (CET) Received: by mail-pf0-f194.google.com with SMTP id q13so4021020pff.0 for ; Fri, 23 Feb 2018 13:18:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=V8fJFCyV9VaAyj3z8opZTGiP66z714lBvlq9c3ACKuQ=; b=tt6B9uBrX03x5viMG+MoHqtrcjvDiAiKIyt8vgEc/qwVLPL15yTlg47b1IamlP7RDW ylvItHMAqNxSnCj9IgpeQvzyAUMOVhfd8TiL7VHAfD8VXfgumF8IrHYvg8nBgZjJVx2b pAPxfFlvdo5/f4M0y2hHuh8pApGdh2RSRst8sem8gTXg7fqGuMt3o74+Tpfbi28bDZ95 83Dns+QSrEKC7JgAAe16QOkIyGsq9AKErnSCVi0xnSS4TyV8TyGIMif5DSwK00sQsVax iU/YCXHaO3ygwCBV812jeEPfXFmfAodP7Vj8BsuRmblU99nxa4DWgN2nR+mEls+6hDAQ mjhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V8fJFCyV9VaAyj3z8opZTGiP66z714lBvlq9c3ACKuQ=; b=kxKGbpYsKY0RKYgQeWWxnC9EFMjXG2YIB4VFfVk1nRX+WKKMtLnYubjjmhxmWdkI68 H6aQxiQ14oJJB5piI3UjcvmXkAvq6UBG+Ia5OK3NaVTyQp9MfC3UNfm1TUkOZ/3XHRPj MA/3ZxsKa9zQZfoD8hnJnaTQTbV5DqM6ciEmeUlUJOqs7UWgaFlQmlZPGVZcTq7XYl9a aWvO41Bu8OfaJkY+zNaRmsRQDQ8dMjBH/Vudm5zlFx9xo1hjj8CsdHK2XM25CiVLmj3E XVoKyT/Lg3NF2RP5RlZ+YmThJa3p5HU+NEMKtLvVTMCstowqLXBxQGZu0F7fzCD4x6s1 SNLQ== X-Gm-Message-State: APf1xPBr/owL0tbKWC7yBrXuVcs473cIQKfzx+G7fnyRBAEUUCZKRAtY p9YvDBd6Dn35JFv9UcPgSJp2dcWE1C0= X-Google-Smtp-Source: AH8x226jqhcAXOrMXgfHbxjN/cC+YEFLtpv6n9gEbvNvJPgW4KLLDk56mOTyBnwbsSeSIE9h8qHo2Q== X-Received: by 10.99.102.5 with SMTP id a5mr2427704pgc.452.1519420682651; Fri, 23 Feb 2018 13:18:02 -0800 (PST) Received: from xeon-e3.lan (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id g67sm5496674pgc.60.2018.02.23.13.18.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 13:18:01 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 23 Feb 2018 13:17:49 -0800 Message-Id: <20180223211752.28651-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180223205648.18690-1-stephen@networkplumber.org> References: <20180223205648.18690-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v2 0/3] logging enhancements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2018 21:18:04 -0000 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). v2 - whitespace checkpatch revisions 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