From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by dpdk.org (Postfix) with ESMTP id 870265B38 for ; Fri, 23 Feb 2018 21:56:52 +0100 (CET) Received: by mail-pl0-f67.google.com with SMTP id x19so5560630plr.13 for ; Fri, 23 Feb 2018 12:56:52 -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; bh=0usF6Y7ZWXmOanbu0B8RIF4s3rGlwzpE+PPyraFR7LI=; b=tqz++i6xp22UvWG+e5149JaMHtqrBDmeFnew5pUmgdeLE9IekS6bwSuRfWV3jToQz7 zztFR01u12rQGi5VvFbqeCnd0udzVVn6YfLOUfSS/eC9VNysgyLfNPZonkek2nByUKGR yas34rJ7Cy5FLTwj5CcOe2tau0RrzmPeZqANk4ID4JhogEixGNP2EI9K102LX084QMf4 f9+KM0Sx77o2OVcwRmQVZML23FzvVm80zHEuX8EcqvuQqXH5GJvMJmRw1h7NTxUNGNaJ s1A+vzNJe5kwarrvs+b4Tg5zKPMzfzGx/isBfIZG9mTP0eYVZZKZ/sqEYb2PiRM0gHHi qdJQ== 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; bh=0usF6Y7ZWXmOanbu0B8RIF4s3rGlwzpE+PPyraFR7LI=; b=clPURvRVixDR2aOVXY5GCtWu8tAGT0wM+H/qOHb50xyCDJjGthPXCoDJlCUc/SQH3B PHXjlnCsoKl03+VIKNUih68E1WnPtml/CbbbNRPnRjGpeS9cEAA7wpZMWnlUthjvhb0D nL9hC/UvqfgM8NXwOkTXe6NPHfiwTnSRD8uddqCy6GMihQ7aX7/hzwrjE6OBTxJ2vFoM ERJuIOsOGk07qudUQxIZlQ6JSl99bTnt0R+PP/qDuUFNfH8TtZhGZCFjbaR0j4/t1yDO SfkQLx7g0FwaxK0+/ZgFOC5p6ykmxIF5by0vgKHIgb/A/yQz825mz2va8Ogm4ezRQLkd bOKw== X-Gm-Message-State: APf1xPDiEgrGM8Uew0TA4GeHbEvxc/wnat1rOtP7R0v6cMYcG6dys47A DkektJfo/kFSWyQELi6jjETfCtg0zy4= X-Google-Smtp-Source: AH8x226WMADwhN0wWmsR4QNg36iwAoO5udM19hh3TfswXpE5LMdCmFbJr5iZlNcI9qHvPVvKlqv7EA== X-Received: by 2002:a17:902:42a3:: with SMTP id h32-v6mr2924233pld.231.1519419411128; Fri, 23 Feb 2018 12:56:51 -0800 (PST) Received: from xeon-e3.lan (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id q66sm6329554pfi.95.2018.02.23.12.56.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 12:56:50 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 23 Feb 2018 12:56:45 -0800 Message-Id: <20180223205648.18690-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.16.1 Subject: [dpdk-dev] [PATCH 0/3] logging enhancments 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 20:56:52 -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). 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