From patchwork Mon Jul 10 06:51:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 786054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x5bXG3xbHz9ryk for ; Mon, 10 Jul 2017 16:53:34 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 13A8FABA; Mon, 10 Jul 2017 06:51:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0D7EEAAC for ; Mon, 10 Jul 2017 06:51:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9A24786 for ; Mon, 10 Jul 2017 06:51:49 +0000 (UTC) Received: from mfilter19-d.gandi.net (mfilter19-d.gandi.net [217.70.178.147]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 70C291720B3 for ; Mon, 10 Jul 2017 08:51:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter19-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter19-d.gandi.net (mfilter19-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 4Hki35N2HGbH for ; Mon, 10 Jul 2017 08:51:47 +0200 (CEST) X-Originating-IP: 98.234.50.139 Received: from localhost.localdomain (unknown [98.234.50.139]) (Authenticated sender: jpettit@ovn.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 7BC6E172097 for ; Mon, 10 Jul 2017 08:51:46 +0200 (CEST) From: Justin Pettit To: dev@openvswitch.org Date: Sun, 9 Jul 2017 23:51:41 -0700 Message-Id: <1499669501-80363-4-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499669501-80363-1-git-send-email-jpettit@ovn.org> References: <1499669501-80363-1-git-send-email-jpettit@ovn.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] vlog: Make "vlog/set" without args set everything to "dbg". X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The documentation stated that "ovs-appctl vlog/set" without any arguments should set every module and destination to debug level. Signed-off-by: Justin Pettit Acked-by: Ben Pfaff --- lib/vlog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vlog.c b/lib/vlog.c index 333337b10d89..ce865b23ec75 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -631,6 +631,10 @@ vlog_unixctl_set(struct unixctl_conn *conn, int argc, const char *argv[], { int i; + /* With no argument, set all destinations and modules to "dbg". */ + if (argc == 1) { + vlog_set_levels(NULL, VLF_ANY_DESTINATION, VLL_DBG); + } for (i = 1; i < argc; i++) { char *msg = vlog_set_levels_from_string(argv[i]); if (msg) { @@ -791,7 +795,7 @@ vlog_init(void) unixctl_command_register( "vlog/set", "{spec | PATTERN:destination:pattern}", - 1, INT_MAX, vlog_unixctl_set, NULL); + 0, INT_MAX, vlog_unixctl_set, NULL); unixctl_command_register("vlog/list", "", 0, 0, vlog_unixctl_list, NULL); unixctl_command_register("vlog/list-pattern", "", 0, 0,