From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by dpdk.org (Postfix) with ESMTP id 74E9F187 for ; Tue, 24 Apr 2018 01:59:11 +0200 (CEST) Received: by mail-pf0-f170.google.com with SMTP id l27so10640477pfk.12 for ; Mon, 23 Apr 2018 16:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tzp/V/0dgXPhh/m+cD5iLMzQzR4AoGlPYXoQuWiyJeY=; b=XT108H3OnWYkXAar/zbFDWcgQQMXA+8T+Yd5Wj5w6ltpN74drkSFBmE9yAU8Fw6qt5 hih5W8aBsyT+ZRlL60c8rMelBTo05Tpe5SVBix+ggf4hg+ZecfR3bTO7C1qyjZe4UrB8 Hz6Akjhw3L+BjTLgjex0B1jei1ITepX02+BTg/3YtYiuaZGOTo5ci36GIDvyi/bt+WDg nJ9WDCu6DZOWHsO9feQNTqbptgdR0FmFIMdccbSlqlQWpnikZAh2R8ex/MqW+2PfRsAA Lqz/akXiezZ7+KgKe1Dztx3/i4SwDdYo403n4gKufW3UhPUfGXZIGXUvbGpg3/u8/zfd iiPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tzp/V/0dgXPhh/m+cD5iLMzQzR4AoGlPYXoQuWiyJeY=; b=sj0DvEH6ynbw7eR5oMBjeKo07R0haRZ6AnV6VLHqRjniwCERNcWpP4kQMSBiWwBHHZ mqTTzkFToqufAlh38Ps1QthAOirsyByemzIjLAd3XDIjP9JAGHJoJnmPumNAUr0C4s4L h3vtYrgyHKmUgzyuQ8mR6f1lItdWHtzSiyihyJx1qH4m6S3GrfYlXEa3b6doi1H4SW85 yKW5FPUoSztIhZKUAhw0mA3/3Ke2iEVhM7sHVQ3YRgNcl1JuVnkK75/Ll5nWBq1wVrb8 XL/xg54+x/BiQxVCxdHe3/l62w4tFb9qEhDXDzps5vE5vXb6GQaM9giMZwU8Xl+u6ztP T9EQ== X-Gm-Message-State: ALQs6tDoE5T/3VhVWlYVjvo3MsnXyBhdzPgwDPBp3n/wQpUrmKrWZVMP PCJ5R27DpKz6NzqFYH/s+qKYHaG+WkU= X-Google-Smtp-Source: AIpwx4+t2QgRQF/hwxdhgLbvBEuvXfPBGujH7w6dNzfL8++g6pvTNBP0fc15GnO/vsRe8QA+LXtMJQ== X-Received: by 2002:a17:902:9a44:: with SMTP id x4-v6mr23139420plv.312.1524527950687; Mon, 23 Apr 2018 16:59:10 -0700 (PDT) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id 125sm22295581pff.158.2018.04.23.16.59.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Apr 2018 16:59:10 -0700 (PDT) Date: Mon, 23 Apr 2018 16:59:08 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20180423165908.3b1a8db8@xeon-e3> In-Reply-To: <3970843.R7zKmtknVI@xps> References: <20180223205648.18690-1-stephen@networkplumber.org> <20180223211752.28651-3-stephen@networkplumber.org> <2341534.1pRvY70a1c@xps> <3970843.R7zKmtknVI@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 23:59:11 -0000 On Mon, 23 Apr 2018 23:08:01 +0200 Thomas Monjalon wrote: > 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? > > Sure, I expected some feedback since it it was a semantic change in the API. Let me also recheck the documentation.