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 7628A6EC58; Thu, 27 May 2021 12:04:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7628A6EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622106279; bh=ztwbakHQYW7dkmygSFx+gpVw3ufvPGLA0V9CHv0mDFs=; 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=w4/6tC7/6rT+me9yZlKdmHHRqfT6mhF4wQ2jjdfFifkJFWPyI8KWx40VU9qsW5wol UaAUNZyGANCYZXw3h1Pdy77zqGEdLSWgwfBa554IoFZLn+YH3fJ55xeMAhLbEiwZXj PQa9FAL4yEWxqj3tnddvAO9wGk3OGH9mmVaJW/So= Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2088B6EC58 for ; Thu, 27 May 2021 12:04:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2088B6EC58 Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1lmBwS-0000yT-Bc; Thu, 27 May 2021 12:04:36 +0300 Date: Thu, 27 May 2021 12:04:31 +0300 To: Cyrill Gorcunov Message-ID: <20210527090431.kiki5jijygpfq7l5@tkn_work_nb> References: <20210507111305.564935-1-gorcunov@gmail.com> <20210526220454.twurat7647tcx4be@tkn_work_nb> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9157EECD0FDB90B9AD87DBA6411CAD026194B5F22AB310E8D00894C459B0CD1B9BAE3B90F2FF7FF518A3A73882C24380A884B6095A7204EBA872416D062D2E1BD X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE755BE8F535441E38CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637EDC9855826FBDF5A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8FBD7C6351F722C08AC466D4C2E914C47117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8883BAB8B32E402CA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B28585415E75ADA9CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE042285CD7A5C321F7C6FCE95544A9834D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3D56D36E97F3F038CAD7EC71F1DB88427C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006377F98CFD14CA0B037EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C97831C758B0842FF53F097D884B766E578A04 X-C1DE0DAB: 0D63561A33F958A52F2350F714740C13B7819EFA05A6FA1E5BC2C3AAF02A2E01D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75E3127721F5A72C97410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34980A6B448CFD1B8A64FB672C05DF7589AA07B284500A8C8B8F5748589CB755490DAA82FFCAA1377E1D7E09C32AA3244C81FAAAE3C7CB86307806817C9F539F77A8CE788DE683120583B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojywAFAsvjBJiXjOoB0gikow== X-Mailru-Sender: FFAA8E4AEE17E37C3731A083A1A85ADEBAE3B90F2FF7FF518A3A73882C24380AB7EA9FE7735C3DBFC664A44C781FCEA7C77752E0C033A69EDF9F2CE1E9CF805D8CD356D4F938FF726C18EFA0BB12DBB0 X-Mras: Ok 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: Alexander Turenko via Tarantool-patches Reply-To: Alexander Turenko Cc: Vladislav Shpilevoy , tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Thu, May 27, 2021 at 10:53:32AM +0300, Cyrill Gorcunov wrote: > On Thu, May 27, 2021 at 01:04:54AM +0300, Alexander Turenko wrote: > > Sorry for the late response. > > > > Looks nice! LGTM. > > > > If you'll have a free time, it would be good to add a simple test case: > > just to automatically verify it for regressions in a future. > > > > Thanks! I force pushed an update where a test added (we can extend > it in future). > +-- 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. The only exception from this rule, known to me, is convertion from a number to a string for box.cfg.listen: | tarantool> box.cfg{listen = 3301} | tarantool> box.cfg.listen | --- | - '3301' | ... I don't know, to be honest, whether the general rule was part of design or becomes so unintentionally. However, when we add listening on zero port ([1]), we added a real port into box.info.listen and didn't perform normalization in box.cfg.listen. Not a blocker, IMHO, but it worth to think about. I'll add Vlad into the discussion. Maybe he knows more than me. [1]: https://github.com/tarantool/tarantool/issues/4620 WBR, Alexander Turenko.