Include chunk_name in swift debug message

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
This commit is contained in:
Stuart McLaren
2012-07-24 12:51:54 +00:00
parent 617609a2f3
commit 33ebb37f4a

View File

@@ -426,9 +426,10 @@ class Store(glance.store.base.Store):
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: