diff --git a/src/Handler/NamedRotatingFileHandler.php b/src/Handler/NamedRotatingFileHandler.php index e141da9..2cb388d 100644 --- a/src/Handler/NamedRotatingFileHandler.php +++ b/src/Handler/NamedRotatingFileHandler.php @@ -200,9 +200,8 @@ protected function rotate() // matching all log files $fileInfo = pathinfo($this->url); - $date = date($this->dateFormat); - $baseFile = "{$this->url}.$date."; - $logFiles = glob("{$this->url}.$date.*"); + $baseFile = "{$this->url}."; + $logFiles = glob("{$this->url}.*"); // sorting the files by name to remove or rename the older ones usort($logFiles, function ($a, $b) {