Catch all error backtrace more readable
luizcarvalho opened this issue · comments
Is your feature request related to a problem? Please describe.
The backgrace showed when happens a error, are formatted like a array
Describe the solution you'd like
Can we join each line with a line break? is more readable.
https://github.com/hellostealth/stealth/blob/master/lib/stealth/controller/controller.rb#L66
How is it
[catch_all] ["/home/desenvolvimento/dev/riki/bot/controllers/hellos_controller.rb:5:in `say_hello'", "/home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/controller/controller.rb:63:in `block in action'", "/home/desenvolvimento/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.0/lib/active_support/callbacks.rb:98:in `run_callbacks'", "/home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/controller/controller.rb:61:in `action'", "/home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/controller/controller.rb:118:in `step'", (...) ,"/home/desenvolvimento/.rvm/gems/ruby-2.5.1/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:73:in `run'", "/home/desenvolvimento/.rvm/gems/ruby-2.5.1/gems/sidekiq-5.1.3/lib/sidekiq/util.rb:16:in `watchdog'", "/home/desenvolvimento/.rvm/gems/ruby-2.5.1/gems/sidekiq-5.1.3/lib/sidekiq/util.rb:25:in `block in safe_thread'"]
14:40:05 sidekiq.1 | [catch_all] CatchAll level2 triggered for error-1540684789327149-hello-say_hello: undefined local variable or method `b' for #<HellosController:0x00007f6fb40086d0>
As for me, it would be more readable
[catch_all] /home/desenvolvimento/dev/riki/bot/controllers/hellos_controller.rb:5:in `say_hello'
14:42:19 sidekiq.1 | /home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/controller/controller.rb:63:in `block in action'
14:42:19 sidekiq.1 | /home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/controller/controller.rb:61:in `action'
14:42:19 sidekiq.1 | /home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/controller/controller.rb:118:in `step'
14:42:19 sidekiq.1 | /home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/controller/controller.rb:96:in `step_to'
14:42:19 sidekiq.1 | /home/desenvolvimento/dev/riki/bot/controllers/bot_controller.rb:12:in `route'
14:42:19 sidekiq.1 | /home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/dispatcher.rb:34:in `process'
14:42:19 sidekiq.1 | /home/desenvolvimento/dev/riki/vendor/gems/stealth/lib/stealth/services/jobs/handle_message_job.rb:17:in `perform'
(...)
14:27:40 sidekiq.1 | [catch_all] CatchAll level1 triggered for error-1540684789327149-hello-say_hello: undefined local variable or method `b' for #<HellosController:0x0000564c20188608>
Fixed in 1.0.x
and the upcoming 1.1
!