Browse Source

logging: when not giving args to -v, log everything, as before

3.2.x
SomberNight 7 years ago
parent
commit
01193be241
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/commands.py
  2. 4
      electrum/util.py

2
electrum/commands.py

@ -831,7 +831,7 @@ def add_global_options(parser):
group = parser.add_argument_group('global options')
# const is for when no argument is given to verbosity
# default is for when the flag is missing
group.add_argument("-v", "--verbosity", dest="verbosity", help="Set verbosity filter", default='', const='', nargs='?')
group.add_argument("-v", "--verbosity", dest="verbosity", help="Set verbosity filter", default='', const='*', nargs='?')
group.add_argument("-D", "--dir", dest="electrum_path", help="electrum directory")
group.add_argument("-P", "--portable", action="store_true", dest="portable", default=False, help="Use local 'electrum_data' directory")
group.add_argument("-w", "--wallet", dest="wallet_path", help="wallet path")

4
electrum/util.py

@ -170,7 +170,7 @@ class PrintError(object):
return self.__class__.__name__
def print_error(self, *msg):
if self.verbosity_filter in verbosity:
if self.verbosity_filter in verbosity or verbosity == '*':
print_stderr("[%s]" % self.diagnostic_name(), *msg)
def print_stderr(self, *msg):
@ -266,7 +266,7 @@ class DaemonThread(threading.Thread, PrintError):
self.print_error("stopped")
verbosity = ''
verbosity = '*'
def set_verbosity(b):
global verbosity
verbosity = b

Loading…
Cancel
Save