Skip to content

Commit 7e76abf

Browse files
jameshalsallchalasr
authored andcommitted
Add basic support for automatic console exception logging
1 parent d154be5 commit 7e76abf

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public function load(array $configs, ContainerBuilder $container)
8181
}
8282

8383
$loader->load('fragment_renderer.xml');
84+
$loader->load('console.xml');
8485

8586
// Property access is used by both the Form and the Validator component
8687
$loader->load('property_access.xml');

Resources/config/console.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" ?>
2+
3+
<container xmlns="http://symfony.com/schema/dic/services"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
6+
7+
<services>
8+
<service id="console.exception_listener" class="Symfony\Component\Console\EventListener\ExceptionListener">
9+
<tag name="kernel.event_subscriber" />
10+
<argument type="service" id="logger" on-invalid="null" />
11+
</service>
12+
</services>
13+
</container>

0 commit comments

Comments
 (0)