From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 2381A469710 for ; Wed, 27 May 2020 15:59:03 +0300 (MSK) From: Oleg Babin References: <20200527111406.145422-1-gorcunov@gmail.com> <20200527111406.145422-8-gorcunov@gmail.com> Message-ID: <6a798eae-7255-d4e4-4e8f-21d22ed34391@tarantool.org> Date: Wed, 27 May 2020 15:58:55 +0300 MIME-Version: 1.0 In-Reply-To: <20200527111406.145422-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 v3 07/10] lua/log: declare log as separate variable List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov , tml Hi! Thanks for your patch see 1 comment below. On 27/05/2020 14:14, Cyrill Gorcunov wrote: > We gonna hide some internal symbols in sake > of communication with box module, thus lets > make it clear. > > Part-of #689 > > Signed-off-by: Cyrill Gorcunov > --- > src/lua/log.lua | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) > > diff --git a/src/lua/log.lua b/src/lua/log.lua > index c6e03ad78..bee2851c8 100644 > --- a/src/lua/log.lua > +++ b/src/lua/log.lua > @@ -187,16 +187,20 @@ local compat_v16 = { > end; > } > > -return setmetatable({ > - warn = say_closure(S_WARN); > - info = say_closure(S_INFO); > - verbose = say_closure(S_VERBOSE); > - debug = say_closure(S_DEBUG); > - error = say_closure(S_ERROR); > - rotate = log_rotate; > - pid = log_pid; > - level = log_level; > - log_format = log_format; > -}, { > +local log ={ nit: Please, add space between `=` and `{` > + warn = say_closure(S_WARN), > + info = say_closure(S_INFO), > + verbose = say_closure(S_VERBOSE), > + debug = say_closure(S_DEBUG), > + error = say_closure(S_ERROR), > + rotate = log_rotate, > + pid = log_pid, > + level = log_level, > + log_format = log_format, > +} > + > +setmetatable(log, { > __index = compat_v16; > }) > + > +return log >