From 411378efcf3d6bfc33ff1f31dc0ebcc2abdd66f9 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 26 Oct 2012 11:28:51 -0700 Subject: Job worker thread logs to stderr if no logger is provided --- activesupport/lib/active_support/queueing.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/queueing.rb b/activesupport/lib/active_support/queueing.rb index c8ba28021d..0631f4e4a8 100644 --- a/activesupport/lib/active_support/queueing.rb +++ b/activesupport/lib/active_support/queueing.rb @@ -66,7 +66,7 @@ module ActiveSupport class ThreadedQueueConsumer def initialize(queue, options = {}) @queue = queue - @logger = options[:logger] + @logger = options[:logger] || Logger.new($stderr) end def start @@ -96,7 +96,6 @@ module ActiveSupport end def handle_exception(job, exception) - raise exception unless @logger @logger.error "Job Error: #{exception.message}\n#{exception.backtrace.join("\n")}" end end -- cgit v1.2.3