mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 12:17:35 +02:00
Avoid collecting duplicate logs if the file cannot be locked
This commit is contained in:
@@ -148,7 +148,9 @@ class DeduplicationHandler extends BufferHandler
|
|||||||
throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore);
|
throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore);
|
||||||
}
|
}
|
||||||
|
|
||||||
flock($handle, LOCK_EX);
|
if (false === flock($handle, LOCK_EX)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$validLogs = [];
|
$validLogs = [];
|
||||||
|
|
||||||
$timestampValidity = time() - $this->time;
|
$timestampValidity = time() - $this->time;
|
||||||
|
Reference in New Issue
Block a user