From 334d2511882def4bae3d29fd3983144638464058 Mon Sep 17 00:00:00 2001 From: Nahuel Angelinetti Date: Tue, 20 Oct 2015 15:05:38 +0200 Subject: [PATCH] #7 - Add logging informations about what is failing --- carrier_pigeon/configuration.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/carrier_pigeon/configuration.py b/carrier_pigeon/configuration.py index ad1861e..865dbdb 100644 --- a/carrier_pigeon/configuration.py +++ b/carrier_pigeon/configuration.py @@ -158,6 +158,8 @@ def output_files_from_item(self, item, row=None): row, ) if not output: + logger.info("Error for item %i with Output Maker %s" + % (item.pk, output_maker)) continue # --- Validate output @@ -176,11 +178,19 @@ def output_files_from_item(self, item, row=None): default=False ) if not validation: + logger.info("Validation error for item %i with" + " validator %s" + % ( + item.pk, + validator_class + )) break # escape from first for loop if not validation: # --- If one validator did not pass we # do no want to send the file - logger.debug('the output was not validated') + logger.info("the output was not validated for item : %i" + % item.pk + ) continue # We don't want the export process to be stopped # Jump to next output @@ -197,6 +207,7 @@ def output_files_from_item(self, item, row=None): ) if local_final_path: + logger.info("File added to output: %s" % local_final_path) output_files.append(local_final_path) # --- Manage related items, if any