From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (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 6C82C469711 for ; Wed, 3 Jun 2020 10:00:04 +0300 (MSK) From: Oleg Babin References: <20200602221817.645015-1-gorcunov@gmail.com> <20200602221817.645015-8-gorcunov@gmail.com> Message-ID: Date: Wed, 3 Jun 2020 10:00:03 +0300 MIME-Version: 1.0 In-Reply-To: <20200602221817.645015-8-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v8 07/12] lua/log: use log module settings inside box.cfg List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov , tml Hi! Thanks for your changes see one comment below. On 03/06/2020 01:18, Cyrill Gorcunov wrote: > Currently box module carries configuration settings in box.cfg > variable which is created dinamically on demand. > > The default values are kept in default_cfg variable. Since we're > going to make the log module to work on its own, we need it to > provide default settings to the box.cfg interface. > > For this sake we export log:box_api table which the main box > module use when needed. > > Part-of #689 > > Signed-off-by: Cyrill Gorcunov > --- > src/box/lua/load_cfg.lua | 26 ++++++++++++++---- > src/lua/log.lua | 59 +++++++++++++++++++++++++++++++++++++++- > 2 files changed, 78 insertions(+), 7 deletions(-) > > diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua > index 5d818addf..7612deb90 100644 > --- a/src/box/lua/load_cfg.lua > +++ b/src/box/lua/load_cfg.lua > @@ -59,10 +59,6 @@ local default_cfg = { > vinyl_range_size = nil, -- set automatically > vinyl_page_size = 8 * 1024, > vinyl_bloom_fpr = 0.05, > - log = nil, > - log_nonblock = nil, > - log_level = 5, > - log_format = "plain", > io_collect_interval = nil, > readahead = 16320, > snap_io_rate_limit = nil, -- no limit > @@ -233,8 +229,8 @@ end > local dynamic_cfg = { > listen = private.cfg_set_listen, > replication = private.cfg_set_replication, > - log_level = private.cfg_set_log_level, > - log_format = private.cfg_set_log_format, > + log_level = log.box_api.set_log_level, > + log_format = log.box_api.set_log_format, Seems after that private.cfg_set_log_format/cfg_set_log_format functions will be unused/redundant. And seems they should be dropped https://github.com/tarantool/tarantool/blob/5a1a220ee84a32841b0834a282fe43201343258a/src/box/lua/cfg.cc#L91