28        $this->options = array_merge(array(
 
   29            'host'     => 
'localhost',
 
   42    protected function write(array $record)
 
   45        if ($this->options[
'username']) {
 
   46            $basicAuth = sprintf(
'%s:%s@', $this->options[
'username'], $this->options[
'password']);
 
   49        $url = 
'http://'.$basicAuth.$this->options[
'host'].
':'.$this->options[
'port'].
'/'.$this->options[
'dbname'];
 
   50        $context = stream_context_create(array(
 
   53                'content'       => $record[
'formatted'],
 
   54                'ignore_errors' => 
true,
 
   56                'header'        => 
'Content-type: application/json',
 
   60        if (
false === @file_get_contents(
$url, 
null, 
$context)) {
 
   61            throw new \RuntimeException(sprintf(
'Could not connect to %s', 
$url));
 
An exception for terminatinating execution or to throw for unit testing.
Base Handler class providing the Handler structure.
__construct(array $options=array(), $level=Logger::DEBUG, $bubble=true)
getDefaultFormatter()
Gets the default formatter.FormatterInterface
write(array $record)
Writes the record down to the log of the implementing handler.void
const DEBUG
Detailed debug information.