diff --git a/components/console/logger.rst b/components/console/logger.rst index 207e7172daa..95511d33c3f 100644 --- a/components/console/logger.rst +++ b/components/console/logger.rst @@ -103,4 +103,15 @@ constructor:: ); $logger = new ConsoleLogger($output, array(), $formatLevelMap); +Errors +------ + +.. versionadded:: 3.2 + The ``hasErrored()`` method was introduced in Symfony 3.2. + +The Console logger includes a ``hasErrored()`` method which returns ``true`` as +soon as any error message has been logged during the execution of the command. +This is useful to decide which status code to return as the result of executing +the command. + .. _PSR-3: http://www.php-fig.org/psr/psr-3/