1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Merge pull request #728 from danizord/hotfix/avoid-needless-formatter

Instantiate LineFormatter only when configured to use short attachment
This commit is contained in:
Jordi Boggiano
2016-03-01 17:01:20 +00:00

View File

@@ -96,7 +96,8 @@ class SlackHandler extends SocketHandler
$this->useAttachment = $useAttachment; $this->useAttachment = $useAttachment;
$this->useShortAttachment = $useShortAttachment; $this->useShortAttachment = $useShortAttachment;
$this->includeContextAndExtra = $includeContextAndExtra; $this->includeContextAndExtra = $includeContextAndExtra;
if ($this->includeContextAndExtra) {
if ($this->includeContextAndExtra && $this->useShortAttachment) {
$this->lineFormatter = new LineFormatter; $this->lineFormatter = new LineFormatter;
} }
} }