mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
fix deprecated
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user