63 protected function write(array $record)
65 $slackbotUrl = sprintf(
66 'https://%s.slack.com/services/hooks/slackbot?token=%s&channel=%s',
73 curl_setopt($ch, CURLOPT_URL, $slackbotUrl);
74 curl_setopt($ch, CURLOPT_POST,
true);
75 curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
76 curl_setopt($ch, CURLOPT_POSTFIELDS, $record[
'message']);
__construct($slackTeam, $token, $channel, $level=Logger::CRITICAL, $bubble=true)
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's Slackbot.
const CRITICAL
Critical conditions.