mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Handled with multiple 'v' or 'q'
This commit is contained in:
parent
9aee3e6e82
commit
f6ec983282
|
@ -106,8 +106,16 @@ class Command(object):
|
|||
options, args = self.parse_args(args)
|
||||
|
||||
verbosity = options.verbose - options.quiet
|
||||
level_dict = {1: "DEBUG", -1: "WARNING", -2: "ERROR", -3: "CRITICAL"}
|
||||
level = level_dict.get(verbosity, "INFO")
|
||||
if verbosity >= 1:
|
||||
level = "DEBUG"
|
||||
elif verbosity == -1:
|
||||
level = "WARNING"
|
||||
elif verbosity == -2:
|
||||
level = "ERROR"
|
||||
elif verbosity <= -3:
|
||||
level = "CRITICAL"
|
||||
else:
|
||||
level = "INFO"
|
||||
|
||||
# The root logger should match the "console" level *unless* we
|
||||
# specified "--log" to send debug logs to a file.
|
||||
|
|
Loading…
Reference in a new issue