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 committed Jul 24, 2012
1 parent 617609a commit 33ebb37
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions glance/store/swift.py
Expand Up @@ -426,9 +426,10 @@ def add(self, image_id, image_file, image_size):
self.container, chunk_name, reader,
content_length=content_length)
bytes_read = reader.bytes_read
msg = _("Wrote chunk %(chunk_id)d/%(total_chunks)s "
"of length %(bytes_read)d to Swift returning "
"MD5 of content: %(chunk_etag)s")
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")
LOG.debug(msg % locals())

if bytes_read == 0:
Expand Down

0 comments on commit 33ebb37

Please sign in to comment.