Example #1
0
 protected function emit(\Plop\RecordInterface $record)
 {
     try {
         if ($this->shouldRollover($record)) {
             $this->doRollover();
         }
         parent::emit($record);
     } catch (\Exception $e) {
         $this->handleError($record, $e);
     }
 }
Example #2
0
 protected function emit(\Plop\RecordInterface $record)
 {
     if (!file_exists($this->baseFilename)) {
         $stats = null;
         $changed = true;
     } else {
         $stats = stat($this->baseFilename);
         $changed = $stat['dev'] != $this->dev || $stat['ino'] != $this->ino;
     }
     if ($changed && $this->stream !== false) {
         if (is_resource($this->stream)) {
             fflush($this->stream);
             fclose($this->stream);
         }
         $this->open();
         if (!$stats) {
             $stats = stat($this->baseFilename);
         }
         $this->dev = $stats['dev'];
         $this->ino = $stats['ino'];
     }
     parent::emit($record);
 }
Example #3
0
File: File.php Project: erebot/plop
 public function emitStub(\Plop\RecordInterface $record)
 {
     return parent::emit($record);
 }