mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-11 07:34:12 +02:00
Make channel in SlackRecord optional to allow for webhooks
This commit is contained in:
@@ -96,12 +96,15 @@ class SlackRecord
|
||||
public function getSlackData(array $record)
|
||||
{
|
||||
$dataArray = array(
|
||||
'channel' => $this->channel,
|
||||
'username' => $this->username,
|
||||
'text' => '',
|
||||
'attachments' => array(),
|
||||
);
|
||||
|
||||
if ($this->channel) {
|
||||
$dataArray['channel'] = $this->channel;
|
||||
}
|
||||
|
||||
if ($this->formatter) {
|
||||
$message = $this->formatter->format($record);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user