From afad6c75a06d626092dbdab3a369ebf9544a75e9 Mon Sep 17 00:00:00 2001 From: Badlop Date: Sat, 13 Aug 2011 17:23:33 +0200 Subject: [PATCH] Provide stacktrace in log report when module start fails --- src/gen_mod.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gen_mod.erl b/src/gen_mod.erl index ed51d7605..28afc12ae 100644 --- a/src/gen_mod.erl +++ b/src/gen_mod.erl @@ -86,8 +86,8 @@ start_module2(Host, Module, Opts) -> catch Class:Reason -> del_module_mnesia(Host, Module), ets:delete(ejabberd_modules, {Module, Host}), - ErrorText = io_lib:format("Problem starting the module ~p for host ~p ~n options: ~p~n ~p: ~p", - [Module, Host, Opts, Class, Reason]), + ErrorText = io_lib:format("Problem starting the module ~p for host ~p ~n options: ~p~n ~p: ~p~n stacktarce: ~p", + [Module, Host, Opts, Class, Reason, erlang:get_stacktrace()]), ?CRITICAL_MSG(ErrorText, []), case is_app_running(ejabberd) of true ->