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:
parent
1e30b85861
commit
d300a87059
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user