qmemman: add --debug option

This commit is contained in:
Marek Marczykowski-Górecki 2016-01-06 00:39:00 +01:00
parent a78ec67071
commit e30e802903
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -205,8 +205,13 @@ class QMemmanServer:
usage = "usage: %prog [options]"
parser = OptionParser(usage)
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()
if options.debug:
logging.root.setLevel(logging.DEBUG)
# close io
sys.stdin.close()
sys.stdout.close()