From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 7DEC56EC58; Thu, 27 May 2021 13:18:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7DEC56EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622110683; bh=VD8YTq3EU8jvbsbiqNQEk2uq6jVKaf2ckiFSDuA2DYo=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=uS8AZJY+u4s2PFp3UZl2XYeEzTte+Jkoi643ahPM3Hsjks6j77o18/vI1+6o1h6Bn wZqwTRpZUv5ghgK2gPZrLVdKF0Ljpgxt0BAvXkMopBkzn8lYGW95L4swKv1resVRt9 N7meFJub58DzF542GSzORS8/Ug5o77uNV41+Sg+Y= Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BBB486EC58 for ; Thu, 27 May 2021 13:18:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BBB486EC58 Received: by mail-lj1-f172.google.com with SMTP id a4so83077ljd.5 for ; Thu, 27 May 2021 03:18:00 -0700 (PDT) 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VUE57bp5ehLkYPGgH5CuB2zz+A1Sk3YVgqwRW+7lvkw=; b=LYXlNGOddW8oB0HYCspuGje8MD3J84X/pFJzAFFC1LRbiU9UWfN7hL/S6lVn/Nek0e 5bXGnRu2/pyEoRFRuGq6giAuMx+KufwOzumcnvEFzsyOJnLWDuX3wPDVt1VmXD8/UOkx W7351HgbLyR/e0jvAeEdWf6eWJTFV2QEZR4sFUNcaDg0eg2gOB07sh5tAErhs8qw7YKL y49sPyl0EFfYpg5kPY6IJih3r9aeLQ9jLHcHrkZU4MPfxjb5XlPme2whCdyqRWcr/TKh z0XB6RnipW3rV34Fda1kFDcmLJkPtd06Vjr8HSirnGz3kngxFzMYxx/S36SPRECE4xiw 9Avw== X-Gm-Message-State: AOAM5320AdyPgO9Jq23vUE17bii5BP08CAdK2uaogqQ+CmiQRgEdppUU L2F0/kmjiWEEV/XrDyG95EPP5xDwkgA= X-Google-Smtp-Source: ABdhPJyuIV9sFH9gCXxZwcbQPP29C/gM++llyyey3J6Y3B6ObzTZoLTaozUnd+QWem9+UHMEUwI/LQ== X-Received: by 2002:a2e:a792:: with SMTP id c18mr1985956ljf.179.1622110679539; Thu, 27 May 2021 03:17:59 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id 10sm187384ljq.39.2021.05.27.03.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 03:17:58 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id C5A4F5A0042; Thu, 27 May 2021 13:17:57 +0300 (MSK) Date: Thu, 27 May 2021 13:17:57 +0300 To: Alexander Turenko Message-ID: References: <20210507111305.564935-1-gorcunov@gmail.com> <20210526220454.twurat7647tcx4be@tkn_work_nb> <20210527090431.kiki5jijygpfq7l5@tkn_work_nb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210527090431.kiki5jijygpfq7l5@tkn_work_nb> User-Agent: Mutt/2.0.7 (2021-05-04) Subject: Re: [Tarantool-patches] [PATCH] lua/log: accept symbolic logging levels X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: Vladislav Shpilevoy , tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Thu, May 27, 2021 at 12:04:31PM +0300, Alexander Turenko wrote: > > > +-- Test symbolic names for loglevels > > +_, err = pcall(log.cfg, {level='fatal'}) > > +test:ok(err == nil and log.cfg.level == 0, 'both got fatal') > > Now I noticed one difference from box.cfg() behaviour: > > | tarantool> box.cfg{log_level = 'verbose'} > | tarantool> box.cfg.log_level > | --- > | - verbose > | ... > > | tarantool> log = require('log') > | tarantool> log.cfg{level = 'verbose'} > | tarantool> log.cfg.level > | --- > | - 6 > | ... > > AFAIU, box.cfg.foo generally returns the same that a user provides in > box.cfg({foo = <...>}), without normalization. Well, as to me this looks somehow inconvenient and worth to implement symbolic output for log leves I think. As a separate feature.