Skip to content

Commit 2088fa4

Browse files
committed
Fixed style, added explanation on why we are re-implementing part of the parent method
1 parent 2e4347b commit 2088fa4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cookbook/console/logging.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ some existing setup for aggregating and analyzing Symfony logs.
1515

1616
There are basically two logging cases you would need:
1717
* Manually logging some information from your command;
18-
* Logging not caught Exceptions.
18+
* Logging uncaught Exceptions.
1919

2020
Manually logging from console command
2121
-------------------------------------
@@ -175,7 +175,10 @@ method, where exception handling should happen::
175175
What happens above is we disable exception catching, so that parent run method
176176
would throw the exceptions. When exception is caught, we simple log it by
177177
accessing the ``logger`` service from the service container and then handle
178-
the rest in the same way parent run method does that.
178+
the rest in the same way parent run method does that (Since parent :method:`run<Symfony\\Bundle\\FrameworkBundle\\Console\\Application::run>`
179+
method will not handle exceptions rendering and status code handling when
180+
`catchExceptions` is set to false, it has to be done in the overridden
181+
method).
179182

180183
For our extended Application class to work properly with console shell mode
181184
we have to do a small trick to intercept ``autoExit`` setter, and store the

0 commit comments

Comments
 (0)