> On May 5, 2015, at 1:54 PM, Robert Collins <
rob...@robertcollins.net> wrote:
>
> On 6 May 2015 at 04:47, Marcus Smith <
qwc...@gmail.com> wrote:
>> "-d"?, don't you mean "-v"?
>
> bah yes.
>
>> there used to be 2 more levels in there, but it was compressed out in a
>> logging refactor last year I think
>>
>> there used to be docs on the mapping of flag count to levels also, but that
>> was removed at some point.
>>
>>
https://github.com/pypa/pip/blob/1.5.4/docs/reference/pip.rst#console-logging
>>
>> I'm concerned that the multiple levels of quiet and verbose has created more
>> confusion than value.
>> do we think anyone uses -q? or -qq?
>
> Well, someone just had a patch added to add -qq for more finesse.
I think it’s fine to use -vv for this, it’s a pretty standard convention
amongst CLI tools.
>
>> I think I'd rather have a simple --debug flag and leave at that, possibly,
>> supporting "--debug --debug" for really chatty debugging.
>
> I'll leave the UI debate to you and Donald :). For my part, I suspect
> its easier to describe the interactions between two diametrically
> opposite flags (-v and -q) than between three. What would --debug -qv
> do? [Yes, I know we can define it, but you can't reason your way to an
> answer as easily].
>
> More importantly, why was the logging refactored, and how can we avoid
> reintroducing the issue that led to that in the first place?
>
I refactored it away from a custom logging solution to using the standard
library logger. The changes in how -v and -q mapped to levels were not
really a thought out choice, I just needed to map them to levels somehow
and I just picked what made the most sense to me at the time. I think adding
a TRACE (or SPEW) level that’s even more verbose than DEBUG is a fine way to
handle that and that adding more -v’s is an equally fine way to handle it.
---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA