Browse Source

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

Change-Id: I72448cd8578b53a658f151354a26066772e4b9ec
changes/03/15603/2
Joe Arnold 9 years ago
parent
commit
5e4ca30281
  1. 1
      bin/swift-bench
  2. 2
      swift/common/bench.py

1
bin/swift-bench

@ -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)

2
swift/common/bench.py

@ -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)

Loading…
Cancel
Save