mod_message_log: Update gen_mod:get_opt() call

This commit is contained in:
Holger Weiss 2018-04-04 02:04:55 +02:00
parent 9c3943b703
commit 435d0bcc3d
1 changed files with 1 additions and 2 deletions

View File

@ -113,8 +113,7 @@ depends(_Host, _Opts) ->
init(Opts) ->
process_flag(trap_exit, true),
ejabberd_hooks:add(reopen_log_hook, ?MODULE, reopen_log, 42),
Filename = gen_mod:get_opt(filename, Opts, fun iolist_to_binary/1,
?DEFAULT_FILENAME),
Filename = gen_mod:get_opt(filename, Opts),
{ok, IoDevice} = file:open(Filename, ?FILE_MODES),
{ok, #state{filename = Filename, iodevice = IoDevice}}.