Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a241a7a

Browse filesBrowse files
committed
minor #10897 Removed a small article about console logging (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Removed a small article about console logging This article was important in the past, but now it's irrelevant, so let's merge it into the main Console article. Commits ------- 23bd98c Removed a small article about console logging
2 parents 08041e8 + 23bd98c commit a241a7a
Copy full SHA for a241a7a

File tree

Expand file treeCollapse file tree

4 files changed

+14
-17
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+14
-17
lines changed

‎_build/redirection_map

Copy file name to clipboardExpand all lines: _build/redirection_map
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
/cookbook/console/commands_as_services /console/commands_as_services
118118
/cookbook/console/console_command /console
119119
/cookbook/console/index /console
120-
/cookbook/console/logging /console/logging
120+
/cookbook/console/logging /console
121121
/cookbook/console/request_context /console/request_context
122122
/cookbook/console/style /console/style
123123
/cookbook/console/usage /console/usage
@@ -359,3 +359,4 @@
359359
/weblink /web_link
360360
/components/weblink /components/web_link
361361
/frontend/encore/installation-no-flex /frontend/encore/installation
362+
/console/logging /console

‎components/console/events.rst

Copy file name to clipboardExpand all lines: components/console/events.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Listeners receive a
129129
$event->setError(new \LogicException('Caught exception', $exitCode, $event->getError()));
130130
});
131131

132+
.. _console-events-terminate:
133+
132134
The ``ConsoleEvents::TERMINATE`` Event
133135
--------------------------------------
134136

‎console.rst

Copy file name to clipboardExpand all lines: console.rst
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For example, you may want a command to create a user::
2929
{
3030
// the name of the command (the part after "bin/console")
3131
protected static $defaultName = 'app:create-user';
32-
32+
3333
protected function configure()
3434
{
3535
// ...
@@ -314,6 +314,15 @@ console::
314314
:class:`Symfony\\Component\\Console\\Application <Symfony\\Component\\Console\\Application>`
315315
and extend the normal ``\PHPUnit\Framework\TestCase``.
316316

317+
Logging Command Errors
318+
----------------------
319+
320+
Whenever an exception is thrown while running commands, Symfony adds a log
321+
message for it including the entire failing command. In addition, Symfony
322+
registers an :doc:`event subscriber </event_dispatcher>` to listen to the
323+
:ref:`ConsoleEvents::TERMINATE event <console-events-terminate>` and adds a log
324+
message whenever a command doesn't finish with the ``0`` exit status.
325+
317326
Learn More
318327
----------
319328

‎console/logging.rst

Copy file name to clipboardExpand all lines: console/logging.rst
-15Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.