8000 Removed a small article about console logging by javiereguiluz · Pull Request #10897 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Removed a small article about console logging #10897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _build/redirection_map
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
/cookbook/console/commands_as_services /console/commands_as_services
/cookbook/console/console_command /console
/cookbook/console/index /console
/cookbook/console/logging /console/logging
/cookbook/console/logging /console
/cookbook/console/request_context /console/request_context
/cookbook/console/style /console/style
/cookbook/console/usage /console/usage
Expand Down Expand Up @@ -359,3 +359,4 @@
/weblink /web_link
/components/weblink /components/web_link
/frontend/encore/installation-no-flex /frontend/encore/installation
/console/logging /console
2 changes: 2 additions & 0 deletions components/console/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ Listeners receive a
$event->setError(new \LogicException('Caught exception', $exitCode, $event->getError()));
});

.. _console-events-terminate:

The ``ConsoleEvents::TERMINATE`` Event
--------------------------------------

Expand Down
11 changes: 10 additions & 1 deletion console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For example, you may want a command to create a user::
{
// the name of the command (the part after "bin/console")
protected static $defaultName = 'app:create-user';

protected function configure()
{
// ...
Expand Down Expand Up @@ -314,6 +314,15 @@ console::
:class:`Symfony\\Component\\Console\\Application <Symfony\\Component\\Console\\Application>`
and extend the normal ``\PHPUnit\Framework\TestCase``.

Logging Command Errors
----------------------

Whenever an exception is thrown while running commands, Symfony adds a log
message for it including the entire failing command. In addition, Symfony
registers an :doc:`event subscriber </event_dispatcher>` to listen to the
:ref:`ConsoleEvents::TERMINATE event <console-events-terminate>` and adds a log
message whenever a command doesn't finish with the ``0`` exit status.

Learn More
----------

Expand Down
15 changes: 0 additions & 15 deletions console/logging.rst

This file was deleted.

0