-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.2][Console] Added more verbosity levels. See GH #6066 #6084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
case $input->hasParameterOption(array('--verbose-debug', '-vvv')) : | ||
$output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to say I don't quite see the advantage of this weird case evaluate me this
vs the if/elseif that was there before. More lines and awkwardness for no benefit (that I can see).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only do this type of switch(true)
when it adds more readability to the code instead of having the whole bunch of elseif ()
lines followed by the long line again and so on as it allows for better separation when going quickly thru the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @Seldaek that if
s would be better.
Cool thanks, did you try out if |
This simply does not work. You cannot pass the option |
Hi, I haven't tried it yet unfortunately and my schedule has just been messed up by my work. I'll update this asap, most likely next Monday. |
Thanks to @stof I've added the missing definition for the new input values and now everything should work properly. |
Converted to |
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'), | ||
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message.'), | ||
new InputOption('--verbose', '-v', InputOption::VALUE_NONE, 'Increase verbosity of messages.'), | ||
new InputOption('--verbose-very', '-vv', InputOption::VALUE_NONE, 'Increase verbosity of messages to display even more verbose messages.'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there has to be a criteria dividing certain messages from others that would explain this better, rather than just saying much more
maybe rather than say much more verbosity we should have |
Like @Seldaek said, I'm not really good at naming this. |
@fabpot is there something that prevents this from going into master? If it's naming, I'm sure someone else could provide a better naming for it. The build failed due to some rather strange condition but unrelated to the changes done. |
Why is it needed? Who draws / how to draw a line between verbose and very verbose? |
Think of the way you do logging where you have multiple levels. As for a quick example, not the brightest star in the Universe but it's very late here:
|
Yeah I know the use case. But I wonder if it's really made use of by users. Because they usually don't want any extra information when everything is ok. Or they want to see all information that is available. Levels in between are probably not that common. |
@Tobion we already have the quiet flag... |
For the composer use case, I think a
|
I just think -vv/-vvv is a more common paradigm than --debug. People actually try it and get no result. Also it is just a verbosity change in the way that it gives you more verbose output. I think it's good to consolidate it all in one v/vv/vvv. 3 levels should be enough for most purposes really. |
👍 to @Seldaek |
ok, let's find good names now. So this PR uses:
I'm not fan of these names. Here are some ideas:
|
How about --verbose=1/2/3 (with --verbose being equivalent to --verbose=1) and -v/-vv/-vvv? |
Any preferences? |
@fabpot @dlsniper I would recommend having a digital verbosity level (same as what @Seldaek suggested) in addition to |
@fabpot can we have feedback from you? Is |
@Seldaek Your proposal looks good to me. |
OK cool, @dlsniper do you have some time to work on updating this? |
This PR was merged into the 2.2 branch. Discussion ---------- [PropertyAccess] Add objectives to pluralMap | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#7483 | License | MIT | Doc PR | Commits ------- 6ef92fd [PropertyAccess] Add objectives to pluralMap
Hey, I'll do this and the doc PR in a day or two tops. |
This PR was merged into the 2.2 branch. Discussion ---------- [Security] Removed unused var | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | I guess | Fixed tickets | - Commits ------- bd26419 [Security] Removed unused var
@dlsniper new PR coming or why did you close? |
@Seldaek yes, seems I've pushed the wrong button then but a new PR for this will come soon, working on it right now. |
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes, breaks the interface
Symfony2 tests pass: yes
Fixes the following tickets: #6066
Todo: documentation?
License of the code: MIT
Documentation PR: ~
See the request in #6066.