Skip to content

Commit 824e097

Browse files
committed
[symfony#2408] Minor tweaks for OutputInterface verbosity level discussion
1 parent f0dd5d9 commit 824e097

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

components/console/introduction.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ You can also set these colors and options inside the tagname::
160160
// bold text on a yellow background
161161
$output->writeln('<bg=yellow;options=bold>foo</bg=yellow;options=bold>');
162162

163-
Verbosity levels
163+
Verbosity Levels
164164
~~~~~~~~~~~~~~~~
165165

166166
The console has 3 levels of verbosity. These are defined in the
@@ -178,14 +178,21 @@ You can specify the quiet verbosity level with the ``--quiet`` or ``-q``
178178
option. The ``--verbose`` or ``-v`` option is used when you want an increased
179179
level of verbosity.
180180

181-
It is possible to print messages in a command only for the according verbosity
181+
.. tip::
182+
183+
The full exception stacktrace is printed if the ``VERBOSITY_VERBOSE``
184+
level is used.
185+
186+
It is possible to print a message in a command for only a specific verbosity
182187
level. For example::
183188

184189
if (OutputInterface::VERBOSITY_VERBOSE === $output->getVerbosity()) {
185190
$output->writeln(...);
186191
}
187192

188-
Note that when the quiet level is used, all output is suppressed.
193+
When the quiet level is used, all output is suppressed as the default
194+
:method:`Symfony\Component\Console\Output::write<Symfony\\Component\\Console\\Output::write>`
195+
method returns without actually printing.
189196

190197
Using Command Arguments
191198
-----------------------

0 commit comments

Comments
 (0)