From bdc5ef231332c89de76df38f0127c349868540a6 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 26 Jun 2015 10:21:44 +0200 Subject: [PATCH 1/4] Improved the explanation about the verbosity levels of the console --- components/console/introduction.rst | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/components/console/introduction.rst b/components/console/introduction.rst index 4868d70e069..3b1f26bd47f 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -173,22 +173,18 @@ Verbosity Levels The ``VERBOSITY_VERY_VERBOSE`` and ``VERBOSITY_DEBUG`` constants were introduced in version 2.3 -The console has 5 levels of verbosity. These are defined in the +The console has five levels of verbosity. These are defined in the :class:`Symfony\\Component\\Console\\Output\\OutputInterface`: -======================================= ================================== -Mode Value -======================================= ================================== -OutputInterface::VERBOSITY_QUIET Do not output any messages -OutputInterface::VERBOSITY_NORMAL The default verbosity level -OutputInterface::VERBOSITY_VERBOSE Increased verbosity of messages -OutputInterface::VERBOSITY_VERY_VERBOSE Informative non essential messages -OutputInterface::VERBOSITY_DEBUG Debug 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. +=========================================== ================================== ===================== +Value Meaning Console option +=========================================== ================================== ===================== +``OutputInterface::VERBOSITY_QUIET`` Do not output any messages ``-q`` or ``--quiet`` +``OutputInterface::VERBOSITY_NORMAL`` The default verbosity level (none) +``OutputInterface::VERBOSITY_VERBOSE`` Increased verbosity of messages ``-v`` +``OutputInterface::VERBOSITY_VERY_VERBOSE`` Informative non essential messages ``-vv`` +``OutputInterface::VERBOSITY_DEBUG`` Debug messages ``-vvv`` +=========================================== ================================== ====================== .. tip:: @@ -198,7 +194,7 @@ level of verbosity. It is possible to print a message in a command for only a specific verbosity level. For example:: - if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { $output->writeln(...); } From 38bc075d0a5935b94f1834a1184dabf3837d586a Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 26 Jun 2015 10:33:13 +0200 Subject: [PATCH 2/4] Minor reword --- components/console/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/introduction.rst b/components/console/introduction.rst index 3b1f26bd47f..eb7ab40ad16 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -173,7 +173,7 @@ Verbosity Levels The ``VERBOSITY_VERY_VERBOSE`` and ``VERBOSITY_DEBUG`` constants were introduced in version 2.3 -The console has five levels of verbosity. These are defined in the +The console has five verbosity levels. These are defined in the :class:`Symfony\\Component\\Console\\Output\\OutputInterface`: =========================================== ================================== ===================== From 0eac43d58096fe5e0611d4f1ea9508f94755330a Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 3 Jul 2015 17:51:33 +0200 Subject: [PATCH 3/4] Reverted an unneeded change --- components/console/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/introduction.rst b/components/console/introduction.rst index eb7ab40ad16..8e8e8b188b2 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -194,7 +194,7 @@ Value Meaning It is possible to print a message in a command for only a specific verbosity level. For example:: - if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { + if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $output->writeln(...); } From 7ca24eddbf22e45f848945548a660abcb31cde4c Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 3 Jul 2015 17:52:02 +0200 Subject: [PATCH 4/4] Fixed RST table syntax --- components/console/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/introduction.rst b/components/console/introduction.rst index 8e8e8b188b2..444a077731b 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -184,7 +184,7 @@ Value Meaning ``OutputInterface::VERBOSITY_VERBOSE`` Increased verbosity of messages ``-v`` ``OutputInterface::VERBOSITY_VERY_VERBOSE`` Informative non essential messages ``-vv`` ``OutputInterface::VERBOSITY_DEBUG`` Debug messages ``-vvv`` -=========================================== ================================== ====================== +=========================================== ================================== ===================== .. tip::