From cd09afe6afbbe46c75874d1e704e79e4d4cde56c Mon Sep 17 00:00:00 2001
From: Luca Scarabello <luca.scarabello@sed.ethz.ch>
Date: Wed, 12 Apr 2017 13:59:35 +0200
Subject: [PATCH] Added some debug messages

---
 TM/io.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/TM/io.py b/TM/io.py
index cdca9a9..987a967 100644
--- a/TM/io.py
+++ b/TM/io.py
@@ -1241,6 +1241,8 @@ def preload_chunk(chunkId, chunkTime, chunkLength, raw=True, processed=True, std
         if ret is not None:
             return ret
 
+    logger.debug('Preloading chunk %d (time %s, length %d)' % (chunkId, chunkTime, chunkLength))
+
     # Get processed chunk from archive and calculate windowed std
     try:
         chunkStream, chunkStream_BP, stdWindowed = \
@@ -1445,6 +1447,8 @@ def preload_template(templateId, templateTime, templateLength, mag):
         if templateStream is not None:
             return templateStream, None
 
+    logger.debug('Preloading template %d %s' % (templateId+1, templateTime))
+
     dir_tp_mseed = os.path.join(config.directory, 'templates_mseed')
     dir_tp_plots = os.path.join(config.directory, 'templates_plot_processed')
     os.makedirs(dir_tp_mseed, exist_ok=True)
-- 
GitLab