qmemman: add --debug option
This commit is contained in:
parent
a78ec67071
commit
e30e802903
@ -205,8 +205,13 @@ class QMemmanServer:
|
|||||||
usage = "usage: %prog [options]"
|
usage = "usage: %prog [options]"
|
||||||
parser = OptionParser(usage)
|
parser = OptionParser(usage)
|
||||||
parser.add_option("-c", "--config", action="store", dest="config", default=config_path)
|
parser.add_option("-c", "--config", action="store", dest="config", default=config_path)
|
||||||
|
parser.add_option("-d", "--debug", action="store_true", dest="debug",
|
||||||
|
default=False, help="Enable debugging")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
if options.debug:
|
||||||
|
logging.root.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
# close io
|
# close io
|
||||||
sys.stdin.close()
|
sys.stdin.close()
|
||||||
sys.stdout.close()
|
sys.stdout.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user