1
0
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:
Anton Nizhegorodov
2016-11-16 01:35:25 +02:00
committed by Haralan Dobrev
parent 5fa5e37305
commit 506e1b99e4
2 changed files with 25 additions and 1 deletions

View File

@@ -191,4 +191,12 @@ class SlackHandler extends SocketHandler
return $this;
}
public function getFormatter()
{
$formatter = parent::getFormatter();
$this->slackRecord->setFormatter($formatter);
return $formatter;
}
}

View File

@@ -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;
}
}