Test file before writing

This commit is contained in:
Dennis Eichhorn 2016-12-19 19:43:11 +01:00
parent cc0e737182
commit 746130671b

View File

@ -309,6 +309,10 @@ class FileLogger implements LoggerInterface
private function write(string $message) /* : void */
{
$this->createFile();
if(!is_readable($this->path)) {
return;
}
$this->fp = fopen($this->path, 'a');
if (flock($this->fp, LOCK_EX) && $this->fp !== false) {