mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 05:07:36 +02:00
Update RotatingFileHandler.php
Use own constant instead of hardcoded string for default dateFormat (const FILE_PER_DAY = 'Y-m-d';)
This commit is contained in:
@@ -50,7 +50,7 @@ class RotatingFileHandler extends StreamHandler
|
|||||||
$this->maxFiles = (int) $maxFiles;
|
$this->maxFiles = (int) $maxFiles;
|
||||||
$this->nextRotation = new \DateTimeImmutable('tomorrow');
|
$this->nextRotation = new \DateTimeImmutable('tomorrow');
|
||||||
$this->filenameFormat = '{filename}-{date}';
|
$this->filenameFormat = '{filename}-{date}';
|
||||||
$this->dateFormat = 'Y-m-d';
|
$this->dateFormat = self::FILE_PER_DAY;
|
||||||
|
|
||||||
parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking);
|
parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user