From: Evgeny Khramtsov Date: Mon, 8 Jul 2019 06:57:33 +0000 (+0300) Subject: Debug hooks X-Git-Tag: 19.08~116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4d352492c7908fcf7efd8d7c359b0eaa1e38bba;p=ejabberd Debug hooks --- diff --git a/src/ejabberd_hooks.erl b/src/ejabberd_hooks.erl index 6a5caaaca..87a559d90 100644 --- a/src/ejabberd_hooks.erl +++ b/src/ejabberd_hooks.erl @@ -379,6 +379,8 @@ run_fold1([{_Seq, Module, Function} | Ls], Hook, Val, Args) -> end. safe_apply(Hook, Module, Function, Args) -> + ?DEBUG("Running hook ~p: ~p:~p/~B", + [Hook, Module, Function, length(Args)]), try if is_function(Function) -> apply(Function, Args); true ->