From: Vsevolod Stakhov Date: Tue, 18 Sep 2018 15:50:20 +0000 (+0100) Subject: [Fix] Show the proper frame when using lua_util.debugm X-Git-Tag: 1.8.0~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d714f0bd1a0a866a60b6e6a30512b8414dff7023;p=thirdparty%2Frspamd.git [Fix] Show the proper frame when using lua_util.debugm --- 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