From 7b7bca3559044744c06dbcf6cb3488b3ee03e9e4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 18 Dec 2016 20:37:05 +0100 Subject: [PATCH 1/2] [Console] Reword a subheading of console/logging.rst --- console/logging.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/console/logging.rst b/console/logging.rst index 6579d42ba37..1978f16c068 100644 --- a/console/logging.rst +++ b/console/logging.rst @@ -167,12 +167,13 @@ service configuration. Your method receives a :class:`Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent` object, which has methods to get information about the event and the exception. -Logging non-0 Exit Statuses +Logging Error Exit Statuses --------------------------- The logging capabilities of the console can be further extended by logging -non-0 exit statuses. This way you will know if a command had any errors, even -if no exceptions were thrown. +commands that return error exist statuses, which are any number different than +zero. This way you will know if a command had any errors, even if no exceptions +were thrown. First configure a listener for console terminate events in the service container: From 53e6a97171701f4cdc43a190d3a65a4496643c8a Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 21 Dec 2016 15:52:42 +0100 Subject: [PATCH 2/2] Minor improvements --- console/logging.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/console/logging.rst b/console/logging.rst index 1978f16c068..7acbca3e81a 100644 --- a/console/logging.rst +++ b/console/logging.rst @@ -167,11 +167,13 @@ service configuration. Your method receives a :class:`Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent` object, which has methods to get information about the event and the exception. +.. _logging-non-0-exit-statuses: + Logging Error Exit Statuses --------------------------- The logging capabilities of the console can be further extended by logging -commands that return error exist statuses, which are any number different than +commands that return error exit statuses, which are any number different than zero. This way you will know if a command had any errors, even if no exceptions were thrown.