From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 6E7EF1C178 for ; Wed, 4 Apr 2018 13:34:14 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id F3F01211CE; Wed, 4 Apr 2018 07:34:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 04 Apr 2018 07:34:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=8Mg6oM/wbrHjSspjzIcdeGEjJX mZE5Oi0DOcWbz+ISQ=; b=Kt7Qo8Ody12LeB36jN+toxKAa+FFuRgYv/OO9udvIz bvTJLeDALB7xNBuwbeO7bjbxo9Ue6mF6NQMzguUX/7Aki2OYlnqluN7puEcqAZtO O9HVgbx+lFPO3vZzXinhBLavndWC45nSph9XzG6dYwxxUh8IGC0h++Rsg7w6KJs7 Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=8Mg6oM /wbrHjSspjzIcdeGEjJXmZE5Oi0DOcWbz+ISQ=; b=C5MOe3nyhnvXcxnwc/uPUc dVDT2aE6qe4eMuVuIajnHbOA+Jr5g3pY65fJRAaujfH3bIGWUcBUUv1wkqARaQuA G6vXbUn25WNhvp5SSGJ2hclaZz/awSGW8G97iQ2xfcT94kbhJOxYIPTxwwNSmIX8 t3bk1thm2sQTkjbRSDxLbVF1i+GiikAXz4tJfCkPML0W6zGr+F2XD6AQk6gzIIXx RY88hXtnwRa1DlnLfqF0ORvo+c4BMfv6dDY1uxxW4aUTnK89Wqa2NTDKz45Y8wyU zxQtSRmF3beMfk4X77OCj65Rx8cpSz5QCNk4Fsnw9Y/+QJmFOOirCWkgYSGNYqew == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7D18FE43C8; Wed, 4 Apr 2018 07:34:13 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 04 Apr 2018 13:34:12 +0200 Message-ID: <2341534.1pRvY70a1c@xps> In-Reply-To: <20180223211752.28651-3-stephen@networkplumber.org> References: <20180223205648.18690-1-stephen@networkplumber.org> <20180223211752.28651-1-stephen@networkplumber.org> <20180223211752.28651-3-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 2/3] log: add ability to match dynamic log based on shell pattern 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: Wed, 04 Apr 2018 11:34:14 -0000 23/02/2018 22:17, Stephen Hemminger: > Regular expressions are not the best way to match a hierarchical > pattern like dynamic log levels. And the separator for dynamic > log levels is period which is the regex wildcard character. > > A better solution is to use filename matching 'globbing' so > that log levels match like file paths. For compatibility, > use colon to separate pattern match style arguments. For > example: > --log-level 'pmd.net.virtio.*:debug' > > Signed-off-by: Stephen Hemminger > --- > +int > +rte_log_set_level_match(const char *pattern, uint32_t level) [...] > +/* set level by regular expression (using pattern match is preferred) */ > int > rte_log_set_level_regexp(const char *pattern, uint32_t level) I think "pattern" is more appropriate than "match" to differentiate from "regexp". So I suggest this function name: rte_log_set_level_pattern