Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc95754

Browse files
committed
feature #7198 Added docs for ConsoleLogger::hasErrored() (javiereguiluz)
This PR was merged into the 3.2 branch. Discussion ---------- Added docs for ConsoleLogger::hasErrored() This fixes #6663. Commits ------- e99177f Added docs for ConsoleLogger::hasErrored()
2 parents 0be9470 + e99177f commit fc95754

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/console/logger.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,15 @@ constructor::
103103
);
104104
$logger = new ConsoleLogger($output, array(), $formatLevelMap);
105105

106+
Errors
107+
------
108+
109+
.. versionadded:: 3.2
110+
The ``hasErrored()`` method was introduced in Symfony 3.2.
111+
112+
The Console logger includes a ``hasErrored()`` method which returns ``true`` as
113+
soon as any error message has been logged during the execution of the command.
114+
This is useful to decide which status code to return as the result of executing
115+
the command.
116+
106117
.. _PSR-3: http://www.php-fig.org/psr/psr-3/

0 commit comments

Comments
 (0)