25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Fix logger initialization on OTP<21.3

This commit is contained in:
Evgeny Khramtsov 2019-10-23 16:41:27 +03:00
parent 1e30b85861
commit d300a87059

View File

@ -120,14 +120,14 @@ start(Level) ->
end,
case logger:add_handler(ejabberd_log, logger_std_h,
#{level => all,
config => Config#{file => EjabberdLog},
config => Config#{type => {file, EjabberdLog}},
formatter => {logger_formatter, FileFmtConfig}}) of
ok -> ok;
{error, {already_exist, _}} -> ok
end,
case logger:add_handler(error_log, logger_std_h,
#{level => error,
config => Config#{file => ErrorLog},
config => Config#{type => {file, ErrorLog}},
formatter => {logger_formatter, FileFmtConfig}}) of
ok -> ok;
{error, {already_exist, _}} -> ok