exception_notification icon indicating copy to clipboard operation
exception_notification copied to clipboard

undefined local variable or method `logger' for #<NotifiedTask:0x10531a8e8>

Open tjoneseng opened this issue 14 years ago • 1 comments

Using NotifiedTask in version 3.0.13 with Rails 2.3.9 / Ruby 1.8.7 results in the above error when an exception is raised by a Rake task. The relevant call stack is below.

.../super_exception_notifier-3.0.13/lib/exception_notification/notifiable.rb:108:in `pass_it_on'
.../super_exception_notifier-3.0.13/lib/exception_notification/notifiable.rb:92:in `rescue_with_hooks'
.../super_exception_notifier-3.0.13/lib/exception_notification/notifiable.rb:47:in `notifiable'
.../super_exception_notifier-3.0.13/lib/exception_notification/notified_task.rb:12:in `define'

tjoneseng avatar Sep 22 '10 18:09 tjoneseng

I have the same issue on 2.3.8. Looks like RakeFileUtils defines verbose and it gets included as a module. You can work around this by doing:

RakeFileUtils.verbose_flag = false

In an initializer or defining an accessor on the object that returns false. Or you could define a logger method that returns a logger.

ebertech avatar Jan 24 '11 19:01 ebertech