diff --git a/src/lua/log.lua b/src/lua/log.lua index 42c810cc759bf3d58d5926c73c0f7d0a19190d92..584bc2b9d669cd6e3d8467ace7978684c923e821 100644 --- a/src/lua/log.lua +++ b/src/lua/log.lua @@ -43,6 +43,8 @@ local function say(level, fmt, ...) if not stat then error(fmt, 3) end + elseif type(fmt) ~= 'string' then + fmt = tostring(fmt) end local frame = debug.getinfo(3, "Sl") local line, file = 0, 'eval' diff --git a/test/app-tap/logger.test.lua b/test/app-tap/logger.test.lua index ad891a4c16b527cdfeae99567fd271982a6c5a5b..10bb2a4d36867ecfcf7f8d414d24359eeb6bc9d7 100755 --- a/test/app-tap/logger.test.lua +++ b/test/app-tap/logger.test.lua @@ -48,5 +48,7 @@ debug = nil log.info("debug is nil") debug = require('debug') +test:ok(log.info(true) == nil, 'check tarantool crash (gh-2516)') + test:check() os.exit()