mod_message_log: Update gen_mod:get_opt() call
This commit is contained in:
parent
9c3943b703
commit
435d0bcc3d
|
@ -113,8 +113,7 @@ depends(_Host, _Opts) ->
|
||||||
init(Opts) ->
|
init(Opts) ->
|
||||||
process_flag(trap_exit, true),
|
process_flag(trap_exit, true),
|
||||||
ejabberd_hooks:add(reopen_log_hook, ?MODULE, reopen_log, 42),
|
ejabberd_hooks:add(reopen_log_hook, ?MODULE, reopen_log, 42),
|
||||||
Filename = gen_mod:get_opt(filename, Opts, fun iolist_to_binary/1,
|
Filename = gen_mod:get_opt(filename, Opts),
|
||||||
?DEFAULT_FILENAME),
|
|
||||||
{ok, IoDevice} = file:open(Filename, ?FILE_MODES),
|
{ok, IoDevice} = file:open(Filename, ?FILE_MODES),
|
||||||
{ok, #state{filename = Filename, iodevice = IoDevice}}.
|
{ok, #state{filename = Filename, iodevice = IoDevice}}.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue