-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Hi,
I've already posted a PR to fix this problem but with the new release my changes were overwritten (issue #871 and PR #872).
I want the SlackHandler to print the simple message, without formatting anything (I've already set the processors to do that).
By this settings:
$slackInfoHandler = new \Monolog\Handler\SlackHandler($slackToken, $infoChannel, 'Swite API Logger', true, $slackEmoji, $infoLevel, $infoBubble, false, true);
$slackInfoHandler->pushProcessor(new \Monolog\Processor\WebProcessor);
$slackInfoHandler->pushProcessor(new \Monolog\Processor\IntrospectionProcessor);
$monolog->pushHandler($slackInfoHandler);
I'm outputting this kind of errors:
I think the problem lies in this piece of code (SlackRecord):
if ($this->formatter) {
$message = $this->formatter->format($record);
} else {
$message = $record['message'];
}
Because Formatter is always declared (code of SlackHandler):
public function getFormatter()
{
$formatter = parent::getFormatter();
$this->slackRecord->setFormatter($formatter);
return $formatter;
}
Metadata
Metadata
Assignees
Labels
No labels