From e619223b4a83b27291c66d998c957c5316c129f1 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; } }