Skip to content

Commit b2f74a3

Browse files
committed
Log thread errors in development, just like in test
1 parent 3e4c0f0 commit b2f74a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/dummy/config/environments/development.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,7 @@
5858
# config.action_cable.disable_request_forgery_protection = true
5959

6060
config.solid_queue.logger = ActiveSupport::Logger.new(nil)
61+
62+
logger = ActiveSupport::Logger.new(STDOUT)
63+
config.solid_queue.on_thread_error = ->(exception) { logger.error("#{exception.class.name}: #{exception.message}\n#{(exception.backtrace || caller)&.join("\n")}") }
6164
end

0 commit comments

Comments
 (0)