From patchwork Sun Sep 10 09:53:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Keith X-Patchwork-Id: 812091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.osmocom.org (client-ip=144.76.43.76; helo=lists.osmocom.org; envelope-from=openbsc-bounces@lists.osmocom.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="unknown key version" (0-bit key; unprotected) header.d=rhizomatica.org header.i=@rhizomatica.org header.b="PRd6hyYN"; dkim-atps=neutral Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 3xqmbk17cDz9sCZ for ; Sun, 10 Sep 2017 19:53:53 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id AE82E38919; Sun, 10 Sep 2017 09:53:36 +0000 (UTC) Authentication-Results: lists.osmocom.org; dmarc=none header.from=rhizomatica.org Authentication-Results: lists.osmocom.org; dkim=fail reason="unknown key version" (0-bit key; unprotected) header.d=rhizomatica.org header.i=@rhizomatica.org header.b=PRd6hyYN X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=198.154.124.221; helo=arroqueno.vm.rhizomatica.org; envelope-from=keith@rhizomatica.org; receiver=openbsc@lists.osmocom.org Authentication-Results: lists.osmocom.org; dmarc=none header.from=rhizomatica.org Received: from arroqueno.vm.rhizomatica.org (mail.rhizomatica.org [198.154.124.221]) by lists.osmocom.org (Postfix) with ESMTP id 6416238904 for ; Sun, 10 Sep 2017 09:53:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arroqueno.vm.rhizomatica.org (Postfix) with ESMTP id 7BB7D134003 for ; Sun, 10 Sep 2017 09:53:27 +0000 (UTC) Authentication-Results: arroqueno.vm.rhizomatica.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=rhizomatica.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rhizomatica.org; h=content-language:content-transfer-encoding:content-type :content-type:mime-version:user-agent:date:date:message-id :subject:subject:from:from:to; s=dkim; t=1505037206; x= 1505901207; bh=/X90QD9wL0JNFlwY3GevmTZG4oQAyKprveR9EnFi0yo=; b=P Rd6hyYN/PvTd/f/Zj9V87TqwwGADL878X/oZCK58gjhYhjuKh7QsHw/TVT1BsYEW tDi9GKnNGPgyGDo8CVIkmxs203SoYNcAw2whlv7uqraH3aP+xzW+eJbyfFMbxYBY RktDjawqULdNwcrTBAMojvGl5Kd0GFqoBQxUpnKwVA= X-Virus-Scanned: Debian amavisd-new at arroqueno.vm.rhizomatica.org Received: from arroqueno.vm.rhizomatica.org ([127.0.0.1]) by localhost (arroqueno.vm.rhizomatica.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oXUZK_p63P_x for ; Sun, 10 Sep 2017 09:53:26 +0000 (UTC) Received: from [192.168.11.102] (espadin.vm.rhizomatica.org [192.168.111.2]) by arroqueno.vm.rhizomatica.org (Postfix) with ESMTPSA id D396B134001; Sun, 10 Sep 2017 09:53:23 +0000 (UTC) To: Max From: Keith Subject: log level everything Message-ID: Date: Sun, 10 Sep 2017 11:53:14 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-GB X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: OpenBSC Mailing List Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Hi Max! Since  https://gerrit.osmocom.org/#/c/3148/ I am no longer able to individually control log levels in the vty. I used to use logging level all everything, then this allowed me to do such as logging level smpp fatal (get rid of annoying bind check every 30 secs) logging level [category i'm interested in] debug Now, all I seem to be able to do is turn all categories to a level with logging level all debug or logging level all notice. individual category directives such as logging level pag fatal make no difference. What am I missing? Thanks! BTW, I get the behaviour I need back by moving your check below the check for "all":: + +         if (category < 0) {                 vty_out(vty, "Invalid category `%s'%s", argv[0], VTY_NEWLINE);                 return CMD_WARNING; diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 01480b1..fb2cab8 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -213,17 +213,18 @@ DEFUN(logging_level,                 return CMD_WARNING;         }   -       if (strcmp(argv[1], "everything") == 0) { /* FIXME: remove this check once 'everything' is phased out */ -               vty_out(vty, "%% Ignoring deprecated logging level %s%s", argv[1], VTY_NEWLINE); -               return CMD_SUCCESS; -       } -         /* Check for special case where we want to set global log level */         if (!strcmp(argv[0], "all")) {                 log_set_log_level(tgt, level);                 return CMD_SUCCESS;         }   +       if (strcmp(argv[1], "everything") == 0) { /* FIXME: remove this check once 'everything' is phased out */ +               vty_out(vty, "%% Ignoring deprecated logging level %s%s", argv[1], VTY_NEWLINE); +               return CMD_SUCCESS; +       }