aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2012-10-26 11:28:51 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2012-10-26 16:18:52 -0700
commit411378efcf3d6bfc33ff1f31dc0ebcc2abdd66f9 (patch)
tree99810d8c35e3118ea6333c4edf8ca6ce918348d2 /activesupport/lib
parent35f2a096f389cc14524f64467ac929583e38d161 (diff)
downloadrails-411378efcf3d6bfc33ff1f31dc0ebcc2abdd66f9.tar.gz
rails-411378efcf3d6bfc33ff1f31dc0ebcc2abdd66f9.tar.bz2
rails-411378efcf3d6bfc33ff1f31dc0ebcc2abdd66f9.zip
Job worker thread logs to stderr if no logger is provided
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/queueing.rb3
1 files changed, 1 insertions, 2 deletions
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