mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 10:06:08 +02:00
RotatingFileHandler to maintain the correct maximum number files when using folder by date (#1671)
This commit is contained in:
committed by
GitHub
parent
eac0c22ad2
commit
8ac56aa42b
@@ -191,7 +191,11 @@ class RotatingFileHandler extends StreamHandler
|
||||
$fileInfo = pathinfo($this->filename);
|
||||
$glob = str_replace(
|
||||
['{filename}', '{date}'],
|
||||
[$fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'],
|
||||
[$fileInfo['filename'], str_replace(
|
||||
['Y', 'y', 'm', 'd'],
|
||||
['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'],
|
||||
$this->dateFormat)
|
||||
],
|
||||
$fileInfo['dirname'] . '/' . $this->filenameFormat
|
||||
);
|
||||
if (isset($fileInfo['extension'])) {
|
||||
|
||||
Reference in New Issue
Block a user