diff --git a/mod_message_log/src/mod_message_log.erl b/mod_message_log/src/mod_message_log.erl index e592e98..342d034 100644 --- a/mod_message_log/src/mod_message_log.erl +++ b/mod_message_log/src/mod_message_log.erl @@ -109,8 +109,8 @@ depends(_Host, _Opts) -> %% ------------------------------------------------------------------- %% gen_server callbacks. %% ------------------------------------------------------------------- --spec init(gen_mod:opts()) -> {ok, state()}. -init(Opts) -> +-spec init(list()) -> {ok, state()}. +init([_Host, Opts]) -> process_flag(trap_exit, true), ejabberd_hooks:add(reopen_log_hook, ?MODULE, reopen_log, 42), Filename = gen_mod:get_opt(filename, Opts),