I cannot log messages from my delayed_job process. Here is the job that is being run.
class MyJob
def initialize(blahblah)
@blahblah = blahblah
@logger = Logger.new(File.join(Rails.root, 'log', 'delayed_job.log'))
end
def perform
@logger.add Logger::INFO, "logging from delayed_job"
#do stuff
end
end
I've tried various logging levels, and I have config.log_level = :debug in my environment configuration. I run delayed_job from monit. I'm using delayed_job 3.0.1 with ruby 1.9.3 and rails 3.0.10.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…