Provide stacktrace in log report when module start fails

This commit is contained in:
Badlop 2011-08-13 17:23:33 +02:00
parent 4a4a7afe22
commit afad6c75a0
1 changed files with 2 additions and 2 deletions

View File

@ -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 ->