[Tarantool-patches] [PATCH 2/3] lua/log: allow to use json formatter early

Cyrill Gorcunov gorcunov at gmail.com
Mon Jun 29 14:23:18 MSK 2020


There is no reason to not allow for json formatter
on early logging stage.

Fixes #5121

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 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



More information about the Tarantool-patches mailing list