From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id CA2D83DC for ; Mon, 23 Apr 2018 23:08:03 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 647AF21D03; Mon, 23 Apr 2018 17:08:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 23 Apr 2018 17:08:03 -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=Kt94pWhwEjAqtXHnq0RM5dkjIo BOEx5IjGGZjwKcpGA=; b=rLSlQqib8RfFiVfVbY9x8LVybV1Foe9qBM5w7Gw/K0 YAdilpxTDt94xsQM9+40JdltM5yS9cnNzCs1YbDvuZ4kYgeYFK7cRmoy4/LbTX77 3ocu7PXtEwalzgcvJjuHbRCpEZH8KPbcFmn3vdByr7ftcWfJzCR9jWgqE5KH+ZrJ M= 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=Kt94pW hwEjAqtXHnq0RM5dkjIoBOEx5IjGGZjwKcpGA=; b=PQnNC5+8w/Zi0xzsnW47Rt rUSpXcycMMRSgyZBm7cKi3p2iweXc1sK0XXXJMA4JR1ftjiivS0O+J+Bz/hiO9MA Fm2h7EXa9MNftsnkBUKtI0Ko0ixvdHQORuCVd/Fo6da7n7HTHZgXon4G5JVJvs3p ORN9PkfEndj/Qr0YzHSd5bSy/fkBUmqdx0HyGlGHmaXzLQp9HJqgyl4GMMNk8hzb kRReI76r8KEdSiG8viLFVI8vvWogK4fuSV3GER7zpQw8+WzrCohDBHSkBdFeVYWN E9CMzB0kirsPnWdRxi3sOSxtjLt0MJVs3/c/TJNluMgtIrIj4UfbxMsbuFkTMJYg == 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 CE4EAE5086; Mon, 23 Apr 2018 17:08:02 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Date: Mon, 23 Apr 2018 23:08:01 +0200 Message-ID: <3970843.R7zKmtknVI@xps> In-Reply-To: <2341534.1pRvY70a1c@xps> References: <20180223205648.18690-1-stephen@networkplumber.org> <20180223211752.28651-3-stephen@networkplumber.org> <2341534.1pRvY70a1c@xps> 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: Mon, 23 Apr 2018 21:08:04 -0000 Hi Stephen, 04/04/2018 13:34, Thomas Monjalon: > 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 Are you OK to do a v3 with this change?