62 $includeContextAndExtra,
83 protected function write(array $record)
85 $postData = $this->slackRecord->getSlackData($record);
90 CURLOPT_URL => $this->webhookUrl,
92 CURLOPT_RETURNTRANSFER =>
true,
93 CURLOPT_HTTPHEADER => array(
'Content-type: application/json'),
94 CURLOPT_POSTFIELDS => $postString
96 if (defined(
'CURLOPT_SAFE_UPLOAD')) {
97 $options[CURLOPT_SAFE_UPLOAD] =
true;
An exception for terminatinating execution or to throw for unit testing.
Base Handler class providing the Handler structure.
static execute($ch, $retries=5, $closeAfterDone=true)
Executes a CURL request with optional retries and exception on failure.
Sends notifications through Slack Webhooks.
__construct($webhookUrl, $channel=null, $username=null, $useAttachment=true, $iconEmoji=null, $useShortAttachment=false, $includeContextAndExtra=false, $level=Logger::CRITICAL, $bubble=true, array $excludeFields=array())
write(array $record)
{Writes the record down to the log of the implementing handler.void}
setFormatter(FormatterInterface $formatter)
{{Sets the formatter.self}}
getFormatter()
{{Gets the formatter.FormatterInterface}}
Slack record utility helping to log to Slack webhooks or API.
const CRITICAL
Critical conditions.
if($session===NULL) $postData