Skip to content

Commit bdc5ef2

Browse files
committed
Improved the explanation about the verbosity levels of the console
1 parent 68db46c commit bdc5ef2

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

components/console/introduction.rst

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -173,22 +173,18 @@ Verbosity Levels
173173
The ``VERBOSITY_VERY_VERBOSE`` and ``VERBOSITY_DEBUG`` constants were introduced
174174
in version 2.3
175175

176-
The console has 5 levels of verbosity. These are defined in the
176+
The console has five levels of verbosity. These are defined in the
177177
:class:`Symfony\\Component\\Console\\Output\\OutputInterface`:
178178

179-
======================================= ==================================
180-
Mode Value
181-
======================================= ==================================
182-
OutputInterface::VERBOSITY_QUIET Do not output any messages
183-
OutputInterface::VERBOSITY_NORMAL The default verbosity level
184-
OutputInterface::VERBOSITY_VERBOSE Increased verbosity of messages
185-
OutputInterface::VERBOSITY_VERY_VERBOSE Informative non essential messages
186-
OutputInterface::VERBOSITY_DEBUG Debug messages
187-
======================================= ==================================
188-
189-
You can specify the quiet verbosity level with the ``--quiet`` or ``-q``
190-
option. The ``--verbose`` or ``-v`` option is used when you want an increased
191-
level of verbosity.
179+
=========================================== ================================== =====================
180+
Value Meaning Console option
181+
=========================================== ================================== =====================
182+
``OutputInterface::VERBOSITY_QUIET`` Do not output any messages ``-q`` or ``--quiet``
183+
``OutputInterface::VERBOSITY_NORMAL`` The default verbosity level (none)
184+
``OutputInterface::VERBOSITY_VERBOSE`` Increased verbosity of messages ``-v``
185+
``OutputInterface::VERBOSITY_VERY_VERBOSE`` Informative non essential messages ``-vv``
186+
``OutputInterface::VERBOSITY_DEBUG`` Debug messages ``-vvv``
187+
=========================================== ================================== ======================
192188

193189
.. tip::
194190

@@ -198,7 +194,7 @@ level of verbosity.
198194
It is possible to print a message in a command for only a specific verbosity
199195
level. For example::
200196

201-
if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
197+
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
202198
$output->writeln(...);
203199
}
204200

0 commit comments

Comments
 (0)