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:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user