mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 05:07:36 +02:00
Make message formatting behaviour same as previous version
This commit is contained in:
committed by
Haralan Dobrev
parent
5fa5e37305
commit
506e1b99e4
@@ -191,4 +191,12 @@ class SlackHandler extends SocketHandler
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFormatter()
|
||||
{
|
||||
$formatter = parent::getFormatter();
|
||||
$this->slackRecord->setFormatter($formatter);
|
||||
|
||||
return $formatter;
|
||||
}
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Formatter\FormatterInterface;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Formatter\LineFormatter;
|
||||
use Monolog\Handler\Slack\SlackRecord;
|
||||
|
||||
/**
|
||||
@@ -98,4 +98,20 @@ class SlackWebhookHandler extends AbstractProcessingHandler
|
||||
|
||||
Curl\Util::execute($ch);
|
||||
}
|
||||
|
||||
public function setFormatter(FormatterInterface $formatter)
|
||||
{
|
||||
parent::setFormatter($formatter);
|
||||
$this->slackRecord->setFormatter($formatter);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFormatter()
|
||||
{
|
||||
$formatter = parent::getFormatter();
|
||||
$this->slackRecord->setFormatter($formatter);
|
||||
|
||||
return $formatter;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user