Fixed swift-bench when using -b and a conf file

Change-Id: I72448cd8578b53a658f151354a26066772e4b9ec
This commit is contained in:
Joe Arnold 2012-11-07 15:57:12 -08:00
parent a69bc08990
commit 5e4ca30281
2 changed files with 2 additions and 1 deletions

View File

@ -127,6 +127,7 @@ if __name__ == '__main__':
sys.exit("No such conf file: %s" % conf)
conf = readconf(conf, 'bench', log_name='swift-bench',
defaults=CONF_DEFAULTS)
conf['bench_clients'] = []
else:
conf = CONF_DEFAULTS
parser.set_defaults(**conf)

View File

@ -116,7 +116,7 @@ class BenchServer(object):
level = logging.DEBUG if conf.log_level.lower() == 'debug' \
else logging.INFO
logger.setLevel(level)
loghandler = logging.StreamHandler(stream=client_file)
loghandler = logging.StreamHandler(client_file)
logformat = logging.Formatter(
'%(server)s %(asctime)s %(levelname)s %(message)s')
loghandler.setFormatter(logformat)