Skip to content

Commit

Permalink
Log errors before, not after #record_error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexParamonov committed Nov 9, 2014
1 parent 4353d23 commit 255d87d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/processor/observer/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def after_finalize(result)
messenger.message messages.finished
end

def after_record_error(result, record, exception)
def before_record_error(result, record, exception)
logger.error "Error processing #{id_for record}: #{exception.inspect}"
end

def after_error(result, exception)
def before_error(result, exception)
logger.fatal "Processing #{processor_name} FAILED: #{exception.backtrace}"
end

Expand Down

0 comments on commit 255d87d

Please sign in to comment.