45 if (!extension_loaded(
'openssl')) {
49 parent::__construct(
'ssl://api.flowdock.com:443',
$level,
$bubble);
59 throw new \InvalidArgumentException(
'The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly');
72 throw new \InvalidArgumentException(
'The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly');
80 protected function write(array $record)
82 parent::write($record);
108 return json_encode($record[
'formatted'][
'flowdock']);
119 $header =
"POST /v1/messages/team_inbox/" . $this->apiToken .
" HTTP/1.1\r\n";
120 $header .=
"Host: api.flowdock.com\r\n";
121 $header .=
"Content-Type: application/json\r\n";
122 $header .=
"Content-Length: " . strlen($content) .
"\r\n";
Sends notifications through the Flowdock push API.
generateDataStream($record)
{}
buildHeader($content)
Builds the header of the API Call.
getDefaultFormatter()
Gets the default formatter.
__construct($apiToken, $level=Logger::DEBUG, $bubble=true)
setFormatter(FormatterInterface $formatter)
{{Sets the formatter.self}}
buildContent($record)
Builds the body of API call.
write(array $record)
{Connect (if necessary) and write to the socket.UnexpectedValueException RuntimeException}
Exception can be thrown if an extension for an handler is missing.
Stores to any socket - uses fsockopen() or pfsockopen().
closeSocket()
Close socket, if open.
const DEBUG
Detailed debug information.