From d714f0bd1a0a866a60b6e6a30512b8414dff7023 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 18 Sep 2018 16:50:20 +0100 Subject: [PATCH] [Fix] Show the proper frame when using lua_util.debugm --- lualib/lua_util.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index 4b18d854cf..2a2a80fc5e 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -732,10 +732,14 @@ if type(rspamd_config) == 'userdata' then end end -exports.debugm = function(mod, ...) +exports.debugm = function(mod, obj_or_fmt, fmt_or_something, ...) local logger = require "rspamd_logger" if unconditional_debug or debug_modules[mod] then - logger.logx(log_level, mod, ...) + if type(obj_or_fmt) == 'string' then + logger.logx(log_level, mod, 2, obj_or_fmt, fmt_or_something, ...) + else + logger.logx(log_level, mod, obj_or_fmt, 2, fmt_or_something, ...) + end end end -- 2.47.3