Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Document verbosity levels #2408

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

tvlooy commented Mar 30, 2013

Document verbosity levels

Note that this info is outdated when symfony/symfony#6066 gets merged.

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed tickets #1572

@wouterj wouterj commented on an outdated diff Mar 30, 2013

components/console/introduction.rst
+Option Value
+================================== ===============================
+OutputInterface::VERBOSITY_QUIET Do not output any messages
+OutputInterface::VERBOSITY_NORMAL The default verbosity level
+OutputInterface::VERBOSITY_VERBOSE Increased verbosity of messages
+================================== ===============================
+
+You can specify the quiet verbosity level with the ``--quiet`` or ``-q``
+option. The ``--verbose`` or ``-v`` option is used when you want an increased
+level of verbosity.
+
+It is possible to print messages in a command only for the according verbosity
+level. For example::
+
+ if (OutputInterface::VERBOSITY_VERBOSE === $output->getVerbosity()) {
+ $output->writeln(/* ... */);
@wouterj

wouterj Mar 30, 2013

Member

this should be $output->writeln(...);

@Sgoettschkes Sgoettschkes commented on the diff Mar 30, 2013

components/console/introduction.rst
@@ -160,6 +160,31 @@ You can also set these colors and options inside the tagname::
// bold text on a yellow background
$output->writeln('<bg=yellow;options=bold>foo</bg=yellow;options=bold>');
+Verbosity levels
+~~~~~~~~~~~~~~~~
+
+The console has 3 levels of verbosity:
+
+================================== ===============================
+Option Value
+================================== ===============================
+OutputInterface::VERBOSITY_QUIET Do not output any messages
+OutputInterface::VERBOSITY_NORMAL The default verbosity level
+OutputInterface::VERBOSITY_VERBOSE Increased verbosity of messages
@Sgoettschkes

Sgoettschkes Mar 30, 2013

Contributor

Could you use an api link here?

Member

weaverryan commented Apr 4, 2013

Hey Tom!

This is excellent - nice work! I've patched it into the 2.0 branch at sha: f0dd5d9

Thanks so much!

@weaverryan weaverryan closed this Apr 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment