From 28e5ba9dd933282321a267a3203b29036118a010 Mon Sep 17 00:00:00 2001 From: Stuart McLaren Date: Tue, 24 Jul 2012 12:51:54 +0000 Subject: [PATCH] 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 --- glance/store/swift.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glance/store/swift.py b/glance/store/swift.py index 6db54c48eb..cf1a05b607 100644 --- a/glance/store/swift.py +++ b/glance/store/swift.py @@ -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.