fix deprecated

This commit is contained in:
Yuri Kuznetsov
2021-01-25 15:31:36 +02:00
parent 9c0643b61f
commit 41ccba7955
3 changed files with 5 additions and 5 deletions

View File

@@ -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);

View File

@@ -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();
}

View File

@@ -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(