Skip to content

Commit

Permalink
Include chunk_name in swift debug message
Browse files Browse the repository at this point in the history
Add chunk_name to swift upload debug message. Helps
to track which image the chunk is part of when several
uploads are occurring.

Fixes LP bug #1028433.

Change-Id: Ieacfd397939b77246e8c89214cbe902c3ed3e28c
  • Loading branch information
Stuart McLaren authored and bcwaldon committed Aug 3, 2012
1 parent e20e2c8 commit 28e5ba9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions glance/store/swift.py
Expand Up @@ -415,11 +415,11 @@ def add(self, image_id, image_file, image_size):
self.container, chunk_name, reader,
content_length=content_length)
bytes_read = reader.bytes_read
logger.debug(_("Wrote chunk %(chunk_id)d/"
"%(total_chunks)s of length %(bytes_read)d "
"to Swift returning MD5 of content: "
"%(chunk_etag)s")
% locals())
msg = _("Wrote chunk %(chunk_name)s (%(chunk_id)d/"
"%(total_chunks)s) of length %(bytes_read)d "
"to Swift returning MD5 of content: "
"%(chunk_etag)s")
logger.debug(msg % locals())

if bytes_read == 0:
# Delete the last chunk, because it's of zero size.
Expand Down

0 comments on commit 28e5ba9

Please sign in to comment.