Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function write(LogEntryInterface $logEntry)
 {
     if ($this->stream) {
         flock($this->stream, LOCK_EX);
         fwrite($this->stream, $logEntry->getFormatted() . $this->getEol());
         flock($this->stream, LOCK_UN);
     }
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 protected function write(LogEntryInterface $logEntry)
 {
     $ident = $logEntry->getChannel();
     if (!openlog($ident, $this->logopts, $this->facility)) {
         throw new LogicException(Message::get(Message::LOG_SYSLOG_FAIL, $ident, $this->facility), Message::LOG_SYSLOG_FAIL);
     }
     syslog($this->priorities[$logEntry->getLevel()], $logEntry->getFormatted());
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 protected function write(LogEntryInterface $logEntry)
 {
     // record all messages
     static::$messages[] = $logEntry->getFormatted();
 }
Exemplo n.º 4
0
 /**
  * {@inheritDoc}
  */
 protected function write(LogEntryInterface $logEntry)
 {
     echo $logEntry->getFormatted();
 }