为什么来自User类的日志消息没有显示在Sidekiq日志窗口中?
expenses_worker.rb
class ExpensesWorker
include Sidekiq::Worker
def perform
logger.info "I am called from worker" #<-- it is visible in Sidekiq!
User.do_stuff
end
end
user.rb
class User < ActiveRecord::Base
self.do_stuff
logger.info "I am doing stuff" #<-- it is NOT visible in Sidekiq...
end
end