From 3521455e513ebad1a7a0dd0451a55aac33e4cc7e Mon Sep 17 00:00:00 2001 From: Daniel Gimenes Date: Wed, 3 Feb 2016 21:23:46 -0200 Subject: [PATCH] LineFormatter if configured to use short attachment --- src/Monolog/Handler/SlackHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Monolog/Handler/SlackHandler.php b/src/Monolog/Handler/SlackHandler.php index 59d4836f..c5428759 100644 --- a/src/Monolog/Handler/SlackHandler.php +++ b/src/Monolog/Handler/SlackHandler.php @@ -96,7 +96,8 @@ class SlackHandler extends SocketHandler $this->useAttachment = $useAttachment; $this->useShortAttachment = $useShortAttachment; $this->includeContextAndExtra = $includeContextAndExtra; - if ($this->includeContextAndExtra) { + + if ($this->includeContextAndExtra && $this->useShortAttachment) { $this->lineFormatter = new LineFormatter; } }