aboutsummaryrefslogtreecommitdiff
path: root/src/gen_mod.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gen_mod.erl')
-rw-r--r--src/gen_mod.erl28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gen_mod.erl b/src/gen_mod.erl
index 31955ef1d..58ec9950f 100644
--- a/src/gen_mod.erl
+++ b/src/gen_mod.erl
@@ -121,7 +121,7 @@ stop_child(Proc) ->
-spec start_modules() -> any().
start_modules() ->
Hosts = ejabberd_option:hosts(),
- ?INFO_MSG("Loading modules for ~s", [misc:format_hosts_list(Hosts)]),
+ ?INFO_MSG("Loading modules for ~ts", [misc:format_hosts_list(Hosts)]),
lists:foreach(fun start_modules/1, Hosts).
-spec start_modules(binary()) -> ok.
@@ -144,7 +144,7 @@ start_module(Host, Module) ->
-spec start_module(binary(), atom(), opts(), integer()) -> ok | {ok, pid()}.
start_module(Host, Module, Opts, Order) ->
- ?DEBUG("Loading ~s at ~s", [Module, Host]),
+ ?DEBUG("Loading ~ts at ~ts", [Module, Host]),
store_options(Host, Module, Opts, Order),
try case Module:start(Host, Opts) of
ok -> ok;
@@ -205,7 +205,7 @@ reload_modules(Host) ->
reload_module(Host, Module, NewOpts, OldOpts, Order) ->
case erlang:function_exported(Module, reload, 3) of
true ->
- ?DEBUG("Reloading ~s at ~s", [Module, Host]),
+ ?DEBUG("Reloading ~ts at ~ts", [Module, Host]),
store_options(Host, Module, NewOpts, Order),
try case Module:reload(Host, NewOpts, OldOpts) of
ok -> ok;
@@ -222,7 +222,7 @@ reload_module(Host, Module, NewOpts, OldOpts, Order) ->
erlang:raise(Class, Reason, StackTrace)
end;
false ->
- ?WARNING_MSG("Module ~s doesn't support reloading "
+ ?WARNING_MSG("Module ~ts doesn't support reloading "
"and will be restarted", [Module]),
stop_module(Host, Module),
start_module(Host, Module, NewOpts, Order)
@@ -284,14 +284,14 @@ stop_module(Host, Module) ->
-spec stop_module_keep_config(binary(), atom()) -> error | ok.
stop_module_keep_config(Host, Module) ->
- ?DEBUG("Stopping ~s at ~s", [Module, Host]),
+ ?DEBUG("Stopping ~ts at ~ts", [Module, Host]),
try Module:stop(Host) of
_ ->
ets:delete(ejabberd_modules, {Module, Host}),
ok
catch ?EX_RULE(Class, Reason, St) ->
StackTrace = ?EX_STACK(St),
- ?ERROR_MSG("Failed to stop module ~s at ~s:~n** ~s",
+ ?ERROR_MSG("Failed to stop module ~ts at ~ts:~n** ~ts",
[Module, Host,
misc:format_exception(2, Class, Reason, StackTrace)]),
error
@@ -429,19 +429,19 @@ is_equal_opt(Opt, NewOpts, OldOpts) ->
format_module_error(Module, Fun, Arity, Opts, Class, Reason, St) ->
case {Class, Reason} of
{error, {bad_return, Module, {error, _} = Err}} ->
- io_lib:format("Failed to ~s module ~s: ~s",
+ io_lib:format("Failed to ~ts module ~ts: ~ts",
[Fun, Module, misc:format_val(Err)]);
{error, {bad_return, Module, Ret}} ->
- io_lib:format("Module ~s returned unexpected value from ~s/~B:~n"
+ io_lib:format("Module ~ts returned unexpected value from ~ts/~B:~n"
"** Error: ~p~n"
"** Hint: this is either not an ejabberd module "
"or it implements ejabberd API incorrectly",
[Module, Fun, Arity, Ret]);
_ ->
- io_lib:format("Internal error of module ~s has "
- "occurred during ~s:~n"
+ io_lib:format("Internal error of module ~ts has "
+ "occurred during ~ts:~n"
"** Options: ~p~n"
- "** ~s",
+ "** ~ts",
[Module, Fun, Opts,
misc:format_exception(2, Class, Reason, St)])
end.
@@ -573,13 +573,13 @@ sort_modules(Host, ModOpts) ->
-spec warn_soft_dep_fail(module(), module()) -> ok.
warn_soft_dep_fail(DepMod, Mod) ->
- ?WARNING_MSG("Module ~s is recommended for module "
- "~s but is not found in the config",
+ ?WARNING_MSG("Module ~ts is recommended for module "
+ "~ts but is not found in the config",
[DepMod, Mod]).
-spec warn_cyclic_dep([module()]) -> ok.
warn_cyclic_dep(Path) ->
- ?WARNING_MSG("Cyclic dependency detected between modules ~s. "
+ ?WARNING_MSG("Cyclic dependency detected between modules ~ts. "
"This is either a bug, or the modules are not "
"supposed to work together in this configuration. "
"The modules will still be loaded though",