From d300a8705977a2cc5f390a837800403d95fe10e9 Mon Sep 17 00:00:00 2001 From: Evgeny Khramtsov Date: Wed, 23 Oct 2019 16:41:27 +0300 Subject: [PATCH] Fix logger initialization on OTP<21.3 --- src/ejabberd_logger.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ejabberd_logger.erl b/src/ejabberd_logger.erl index 010268107..916ca6fea 100644 --- a/src/ejabberd_logger.erl +++ b/src/ejabberd_logger.erl @@ -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