Created
February 29, 2012 22:22
-
-
Save mcfiredrill/1944934 to your computer and use it in GitHub Desktop.
logging from delayed_job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment