Skip to content

Instantly share code, notes, and snippets.

@mcfiredrill
Created February 29, 2012 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcfiredrill/1944934 to your computer and use it in GitHub Desktop.
Save mcfiredrill/1944934 to your computer and use it in GitHub Desktop.
logging from delayed_job
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