Log modules startup
This commit is contained in:
parent
85f09b365f
commit
c3c75affa9
|
@ -127,10 +127,9 @@ stop_child(Proc) ->
|
||||||
|
|
||||||
%% Start all the modules in all the hosts
|
%% Start all the modules in all the hosts
|
||||||
start_modules() ->
|
start_modules() ->
|
||||||
lists:foreach(
|
Hosts = ?MYHOSTS,
|
||||||
fun(Host) ->
|
?INFO_MSG("Loading modules for ~s", [format_hosts_list(Hosts)]),
|
||||||
start_modules(Host)
|
lists:foreach(fun start_modules/1, Hosts).
|
||||||
end, ?MYHOSTS).
|
|
||||||
|
|
||||||
get_modules_options(Host) ->
|
get_modules_options(Host) ->
|
||||||
sort_modules(Host, ejabberd_config:get_option({modules, Host}, [])).
|
sort_modules(Host, ejabberd_config:get_option({modules, Host}, [])).
|
||||||
|
@ -745,6 +744,16 @@ format_module_error(Module, Fun, Arity, Opts, Class, Reason, St) ->
|
||||||
[Module, Fun, Opts, Class, Reason, St])
|
[Module, Fun, Opts, Class, Reason, St])
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
format_hosts_list([Host]) ->
|
||||||
|
Host;
|
||||||
|
format_hosts_list([H1, H2]) ->
|
||||||
|
[H1, " and ", H2];
|
||||||
|
format_hosts_list([H1, H2, H3]) ->
|
||||||
|
[H1, ", ", H2, " and ", H3];
|
||||||
|
format_hosts_list([H1, H2|Hs]) ->
|
||||||
|
io_lib:format("~s, ~s and ~B more hosts",
|
||||||
|
[H1, H2, length(Hs)]).
|
||||||
|
|
||||||
-spec db_type(binary() | global, module()) -> db_type();
|
-spec db_type(binary() | global, module()) -> db_type();
|
||||||
(opts(), module()) -> db_type().
|
(opts(), module()) -> db_type().
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue