Commit 18c3e8ef by Carsten Brandt

clear stat cache in logger to avoid cache of file state

fixes #2988
parent bc00449c
...@@ -116,6 +116,7 @@ class FileTarget extends Target ...@@ -116,6 +116,7 @@ class FileTarget extends Target
$file = $this->logFile; $file = $this->logFile;
for ($i = $this->maxLogFiles; $i > 0; --$i) { for ($i = $this->maxLogFiles; $i > 0; --$i) {
$rotateFile = $file . '.' . $i; $rotateFile = $file . '.' . $i;
clearstatcache();
if (is_file($rotateFile)) { if (is_file($rotateFile)) {
// suppress errors because it's possible multiple processes enter into this section // suppress errors because it's possible multiple processes enter into this section
if ($i === $this->maxLogFiles) { if ($i === $this->maxLogFiles) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment