mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-01 02:40:24 +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);
|
||||
}
|
||||
|
||||
flock($handle, LOCK_EX);
|
||||
if (false === flock($handle, LOCK_EX)) {
|
||||
return;
|
||||
}
|
||||
$validLogs = [];
|
||||
|
||||
$timestampValidity = time() - $this->time;
|
||||
|
Reference in New Issue
Block a user