43 parent::__construct($filename,
$mode, $delay);
44 if (!file_exists($filename)) {
45 $this->dev = $this->ino = -1;
47 $stats = stat($filename);
48 $this->dev = $stats[
'dev'];
49 $this->ino = $stats[
'ino'];
56 if (!file_exists($this->baseFilename)) {
60 $stats = stat($this->baseFilename);
63 ($stat[
'ino'] != $this->ino)
67 if ($changed && $this->stream !==
false) {
68 if (is_resource($this->stream)) {
69 fflush($this->stream);
70 fclose($this->stream);
74 $stats = stat($this->baseFilename);
76 $this->dev = $stats[
'dev'];
77 $this->ino = $stats[
'ino'];
79 parent::emit($record);
emit(\Plop\RecordInterface $record)
$mode
Opening mode for the log file.
Interface for a log record.
An handler that writes log messages to a file.
$ino
Inode number of the watched file.
An handler that logs to a file and automatically reopens that file when it changes (eg...
$dev
Device the watched file resides on.
__construct($filename, $mode= 'at', $delay=false)