Merge "Make the logger information format"

This commit is contained in:
Jenkins 2016-08-09 10:27:35 +00:00 committed by Gerrit Code Review
commit bf17189484
2 changed files with 8 additions and 7 deletions

View File

@ -1747,10 +1747,11 @@ class Controller(object):
self.app.account_ring, partition, 'PUT',
path, [headers] * len(nodes))
if is_success(resp.status_int):
self.app.logger.info('autocreate account %r' % path)
self.app.logger.info(_('autocreate account %r'), path)
clear_info_cache(self.app, req.environ, account)
else:
self.app.logger.warning('Could not autocreate account %r' % path)
self.app.logger.warning(_('Could not autocreate account %r'),
path)
def GETorHEAD_base(self, req, server_type, node_iter, partition, path,
concurrency=1, client_chunk_size=None):

View File

@ -1258,11 +1258,11 @@ class ECAppIter(object):
pass
except ChunkReadTimeout:
# unable to resume in GetOrHeadHandler
self.logger.exception("Timeout fetching fragments for %r" %
self.logger.exception(_("Timeout fetching fragments for %r"),
self.path)
except: # noqa
self.logger.exception("Exception fetching fragments for %r" %
self.path)
self.logger.exception(_("Exception fetching fragments for"
" %r"), self.path)
finally:
queue.resize(2) # ensure there's room
queue.put(None)
@ -1290,8 +1290,8 @@ class ECAppIter(object):
try:
segment = self.policy.pyeclib_driver.decode(fragments)
except ECDriverError:
self.logger.exception("Error decoding fragments for %r" %
self.path)
self.logger.exception(_("Error decoding fragments for"
" %r"), self.path)
raise
yield segment