Fixed swift-bench when using -b and a conf file
Change-Id: I72448cd8578b53a658f151354a26066772e4b9ec
This commit is contained in:
parent
a69bc08990
commit
5e4ca30281
@ -127,6 +127,7 @@ if __name__ == '__main__':
|
|||||||
sys.exit("No such conf file: %s" % conf)
|
sys.exit("No such conf file: %s" % conf)
|
||||||
conf = readconf(conf, 'bench', log_name='swift-bench',
|
conf = readconf(conf, 'bench', log_name='swift-bench',
|
||||||
defaults=CONF_DEFAULTS)
|
defaults=CONF_DEFAULTS)
|
||||||
|
conf['bench_clients'] = []
|
||||||
else:
|
else:
|
||||||
conf = CONF_DEFAULTS
|
conf = CONF_DEFAULTS
|
||||||
parser.set_defaults(**conf)
|
parser.set_defaults(**conf)
|
||||||
|
@ -116,7 +116,7 @@ class BenchServer(object):
|
|||||||
level = logging.DEBUG if conf.log_level.lower() == 'debug' \
|
level = logging.DEBUG if conf.log_level.lower() == 'debug' \
|
||||||
else logging.INFO
|
else logging.INFO
|
||||||
logger.setLevel(level)
|
logger.setLevel(level)
|
||||||
loghandler = logging.StreamHandler(stream=client_file)
|
loghandler = logging.StreamHandler(client_file)
|
||||||
logformat = logging.Formatter(
|
logformat = logging.Formatter(
|
||||||
'%(server)s %(asctime)s %(levelname)s %(message)s')
|
'%(server)s %(asctime)s %(levelname)s %(message)s')
|
||||||
loghandler.setFormatter(logformat)
|
loghandler.setFormatter(logformat)
|
||||||
|
Loading…
Reference in New Issue
Block a user