Skip to content

Commit cb532eb

Browse files
authored
JsonFormatter supports includeStacktraces too
1 parent fbbcefd commit cb532eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MonologBundle.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\MonologBundle;
1313

14+
use Monolog\Formatter\JsonFormatter;
1415
use Monolog\Formatter\LineFormatter;
1516
use Monolog\Handler\HandlerInterface;
1617
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\AddSwiftMailerTransportPass;
@@ -43,7 +44,7 @@ public function build(ContainerBuilder $container)
4344
public static function includeStacktraces(HandlerInterface $handler)
4445
{
4546
$formatter = $handler->getFormatter();
46-
if ($formatter instanceof LineFormatter) {
47+
if ($formatter instanceof LineFormatter || $formatter instanceof JsonFormatter) {
4748
$formatter->includeStacktraces();
4849
}
4950
}

0 commit comments

Comments
 (0)