[Tarantool-patches] [PATCH v4 5/8] lua/log: declare log as separate variable
Oleg Babin
olegrok at tarantool.org
Thu May 28 13:40:35 MSK 2020
Hi! Thanks for your patch. LGTM.
On 28/05/2020 13:07, 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 <gorcunov at gmail.com>
> ---
> 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 2491501f7..4b078d598 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 = {
> + 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
>
More information about the Tarantool-patches
mailing list