mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +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,
|
end,
|
||||||
case logger:add_handler(ejabberd_log, logger_std_h,
|
case logger:add_handler(ejabberd_log, logger_std_h,
|
||||||
#{level => all,
|
#{level => all,
|
||||||
config => Config#{file => EjabberdLog},
|
config => Config#{type => {file, EjabberdLog}},
|
||||||
formatter => {logger_formatter, FileFmtConfig}}) of
|
formatter => {logger_formatter, FileFmtConfig}}) of
|
||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, {already_exist, _}} -> ok
|
{error, {already_exist, _}} -> ok
|
||||||
end,
|
end,
|
||||||
case logger:add_handler(error_log, logger_std_h,
|
case logger:add_handler(error_log, logger_std_h,
|
||||||
#{level => error,
|
#{level => error,
|
||||||
config => Config#{file => ErrorLog},
|
config => Config#{type => {file, ErrorLog}},
|
||||||
formatter => {logger_formatter, FileFmtConfig}}) of
|
formatter => {logger_formatter, FileFmtConfig}}) of
|
||||||
ok -> ok;
|
ok -> ok;
|
||||||
{error, {already_exist, _}} -> ok
|
{error, {already_exist, _}} -> ok
|
||||||
|
Loading…
Reference in New Issue
Block a user