Skip to content

Commit

Permalink
liberation#7 - Add logging informations about what is failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahuel Angelinetti committed Oct 20, 2015
1 parent 59f8473 commit 334d251
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion carrier_pigeon/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 334d251

Please sign in to comment.