Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0dd5d9

Browse files
tvlooyweaverryan
authored andcommitted
Document verbosity levels
1 parente5814e6 commitf0dd5d9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

‎components/console/introduction.rst‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,32 @@ 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
164+
~~~~~~~~~~~~~~~~
165+
166+
The console has 3 levels of verbosity. These are defined in the
167+
:class:`Symfony\\Component\\Console\\Output\\OutputInterface`:
168+
169+
================================== ===============================
170+
Option Value
171+
================================== ===============================
172+
OutputInterface::VERBOSITY_QUIET Do not output any messages
173+
OutputInterface::VERBOSITY_NORMAL The default verbosity level
174+
OutputInterface::VERBOSITY_VERBOSE Increased verbosity of messages
175+
================================== ===============================
176+
177+
You can specify the quiet verbosity level with the ``--quiet`` or ``-q``
178+
option. The ``--verbose`` or ``-v`` option is used when you want an increased
179+
level of verbosity.
180+
181+
It is possible to print messages in a command only for the according verbosity
182+
level. For example::
183+
184+
if (OutputInterface::VERBOSITY_VERBOSE === $output->getVerbosity()) {
185+
$output->writeln(...);
186+
}
187+
188+
Note that when the quiet level is used, all output is suppressed.
163189

164190
Using Command Arguments
165191
-----------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp