/** * {@inheritdoc} */ protected function send(Event $event) : bool { $handler = VarDumper::setHandler(); dump($event->format()); VarDumper::setHandler($handler); return true; }
/** * {@inheritdoc} */ protected function send(Event $event) : bool { if (!is_resource($this->resource)) { $this->resource = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); } $message = $event->format(false); $udpMessage = '<' . ($this->facility + $this->convertType($event->getLevel())) . '>' . $event->getDate()->format('M d H:i:s') . ' ' . ($this->hostname ? $this->hostname . ' ' : '') . $this->name . ($this->pid ? '[' . $this->pid . ']' : '') . ': ' . $message . ""; if (strlen($udpMessage) > self::DATAGRAM_MAX_LENGTH) { $udpMessage = substr($udpMessage, 0, self::DATAGRAM_MAX_LENGTH); } $length = strlen($udpMessage); $size = socket_sendto($this->resource, $udpMessage, $length, $flags = 0, $this->ip, $this->port); return $size == $length; }
/** * {@inheritdoc} */ protected function send(Event $event) : bool { $message = $event->format(false); openlog($this->name, LOG_ODELAY, $this->facility); $return = syslog($this->convertType($event->getLevel()), $message); closelog(); return $return; }
/** * {@inheritdoc} */ protected function send(Event $event) : bool { file_put_contents($this->path, $event->format(), FILE_APPEND); return true; }
/** * {@inheritdoc} */ protected function send(Event $event) : bool { file_put_contents('php://stderr', $event->format()); return true; }