14use Gelf\IMessagePublisher;
15use Gelf\PublisherInterface;
17use InvalidArgumentException;
44 throw new InvalidArgumentException(
"Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance");
55 $this->publisher =
null;
61 protected function write(array $record)
63 $this->publisher->publish($record[
'formatted']);
Base Handler class providing the Handler structure.
Handler to send messages to a Graylog2 (http://www.graylog2.org) server.
write(array $record)
{Writes the record down to the log of the implementing handler.void}
close()
{Closes the handler.This will be called automatically when the object is destroyed}
getDefaultFormatter()
Gets the default formatter.FormatterInterface
__construct($publisher, $level=Logger::DEBUG, $bubble=true)
const DEBUG
Detailed debug information.