From 211f489f66595bdb855afeb90096bd50ad0899d7 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Sat, 11 Dec 2010 21:32:36 +1000 Subject: [PATCH] Add logging regarding whether cached image is used or not --- chunk.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chunk.py b/chunk.py index 92efe10..6af295c 100644 --- a/chunk.py +++ b/chunk.py @@ -327,6 +327,7 @@ class ChunkRenderer(object): if os.path.getmtime(self.chunkfile) <= os.path.getmtime(oldimg_path): # chunkfile is older than the image, don't even bother checking # the hash + logging.debug("Using cached image") return oldimg_path # Reasons for the code to get to this point: @@ -352,6 +353,7 @@ class ChunkRenderer(object): # Before we return it, update its mtime so the next round # doesn't have to check the hash os.utime(dest_path, None) + logging.debug("Using cached image") return dest_path else: # Remove old image for this chunk. Anything already existing is