From 41ccba795576a9cb83d563205d058a1c361cc4e9 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 25 Jan 2021 15:31:36 +0200 Subject: [PATCH] fix deprecated --- application/Espo/Core/Log/Handler/EspoFileHandler.php | 2 +- application/Espo/Core/Log/Handler/EspoRotatingFileHandler.php | 4 ++-- application/Espo/Core/Log/LogLoader.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/Espo/Core/Log/Handler/EspoFileHandler.php b/application/Espo/Core/Log/Handler/EspoFileHandler.php index 3868ca518f..5e57047022 100644 --- a/application/Espo/Core/Log/Handler/EspoFileHandler.php +++ b/application/Espo/Core/Log/Handler/EspoFileHandler.php @@ -48,7 +48,7 @@ class EspoFileHandler extends MonologStreamHandler protected $maxErrorMessageLength = 5000; - public function __construct(string $filename, $level = Logger::DEBUG, bool $bubble = true, Config $config) + public function __construct(Config $config, string $filename, $level = Logger::DEBUG, bool $bubble = true) { parent::__construct($filename, $level, $bubble); diff --git a/application/Espo/Core/Log/Handler/EspoRotatingFileHandler.php b/application/Espo/Core/Log/Handler/EspoRotatingFileHandler.php index 4570442946..bf744123b6 100644 --- a/application/Espo/Core/Log/Handler/EspoRotatingFileHandler.php +++ b/application/Espo/Core/Log/Handler/EspoRotatingFileHandler.php @@ -46,12 +46,12 @@ class EspoRotatingFileHandler extends EspoFileHandler protected $maxFiles; public function __construct( - string $filename, int $maxFiles = 0, $level = Logger::DEBUG, bool $bubble = true, Config $config + Config $config, string $filename, int $maxFiles = 0, $level = Logger::DEBUG, bool $bubble = true ) { $this->filename = $filename; $this->maxFiles = (int) $maxFiles; - parent::__construct($this->getTimedFilename(), $level, $bubble, $config); + parent::__construct($config, $this->getTimedFilename(), $level, $bubble); $this->rotate(); } diff --git a/application/Espo/Core/Log/LogLoader.php b/application/Espo/Core/Log/LogLoader.php index 62b5f5c757..4dd2c60e33 100644 --- a/application/Espo/Core/Log/LogLoader.php +++ b/application/Espo/Core/Log/LogLoader.php @@ -108,10 +108,10 @@ class LogLoader if ($rotation) { $maxFileNumber = $this->config->get('logger.maxFileNumber') ?? self::MAX_FILE_NUMBER; - $handler = new EspoRotatingFileHandler($path, $maxFileNumber, $levelCode, true, $this->config); + $handler = new EspoRotatingFileHandler($this->config, $path, $maxFileNumber, $levelCode, true); } else { - $handler = new EspoFileHandler($path, $levelCode, true, $this->config); + $handler = new EspoFileHandler($this->config, $path, $levelCode, true); } $formatter = new LineFormatter(