From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 5D45F42F4AD for ; Mon, 29 Jun 2020 14:23:50 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id f8so5319999ljc.2 for ; Mon, 29 Jun 2020 04:23:50 -0700 (PDT) From: Cyrill Gorcunov Date: Mon, 29 Jun 2020 14:23:18 +0300 Message-Id: <20200629112319.154909-3-gorcunov@gmail.com> In-Reply-To: <20200629112319.154909-1-gorcunov@gmail.com> References: <20200629112319.154909-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/3] lua/log: allow to use json formatter early List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml There is no reason to not allow for json formatter on early logging stage. Fixes #5121 Signed-off-by: Cyrill Gorcunov --- src/lua/log.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lua/log.lua b/src/lua/log.lua index bed690526..66fdaca7b 100644 --- a/src/lua/log.lua +++ b/src/lua/log.lua @@ -203,10 +203,8 @@ local function verify_format(key, name) end if fmt_str2num[name] == ffi.C.SF_JSON then - if ffi.C.log_type() == ffi.C.SAY_LOGGER_SYSLOG or - ffi.C.log_type() == ffi.C.SAY_LOGGER_BOOT then - local m = "%s can't be used with " .. - "syslog or boot-time logger" + if ffi.C.log_type() == ffi.C.SAY_LOGGER_SYSLOG then + local m = "%s can't be used with syslog logger" return false, m:format(fmt_num2str[ffi.C.SF_JSON]) end end -- 2.26.2