Module: MandrillQueue::Hooks

Extended by:
Logging
Included in:
Worker
Defined in:
lib/mandrill_queue/worker/hooks.rb

Instance Method Summary collapse

Methods included from Logging

log_results, logger, pretty, result_formatter

Instance Method Details

#on_failure_logging(error, message) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/mandrill_queue/worker/hooks.rb', line 9

def on_failure_logging(error, message)
	s = StringIO.new
	PP.pp(message, s)
	s.rewind
	logging.error <<-TXT.strip
	#{'=' * 50}
	An exception has occurred for the following message:\n#{pretty(message)}
	TXT
	logging.error(error)
	logging.error('=' * 50)
end