aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_util.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-09-18 16:50:20 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-09-18 16:50:20 +0100
commitd714f0bd1a0a866a60b6e6a30512b8414dff7023 (patch)
treec168ef9a0f52ff998cb5937ee8f3391d94e43b59 /lualib/lua_util.lua
parent547c3f34f40d2a08f909321afb46045277d23b8b (diff)
downloadrspamd-d714f0bd1a0a866a60b6e6a30512b8414dff7023.tar.gz
rspamd-d714f0bd1a0a866a60b6e6a30512b8414dff7023.zip
[Fix] Show the proper frame when using lua_util.debugm
Diffstat (limited to 'lualib/lua_util.lua')
-rw-r--r--lualib/lua_util.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua
index 4b18d854c..2a2a80fc5 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