title: Delayed Job not logging in Production
body: <p>I want my delayed job "code" to log in a different log file for business requirements. So I log a custom status in a log called as dj.log. Inside the "serialized" job, I am putting the log statements to log in my file.</p>
  
  <p>Here is how the setup is </p>
  
  <pre><code>Delayed::Worker.destroy_failed_jobs = false
  Delayed::Worker.sleep_delay = 60
  Delayed::Worker.max_attempts = 10
  Delayed::Worker.delay_jobs = !( Rails.env.test? || Rails.env.development? ) #dont use delayed_job in development or test mode
  
  #Delayed_job custom logger
  DJ_LOGFILE = File.join(Rails.root, 'log', 'dj.log')
  </code></pre>
  
  <p>and here is the job that the workers actually do</p>
  
  <pre><code>    people.each {|p| Mailer.mail(1233, p).deliver; sent_to &lt;&lt; p.email }                
      Logger.new(DJ_LOGFILE).info("[DELIVERED] All Emails delivered (#{sent_to.join(", ")})")
  </code></pre>
  
  <p>what could be the problem here ? please help</p>