title: Using another logger in Rails
body: <p>In one specific situation, I want to use an alternative log file for sidekiq background jobs. So I instantiate a new Logger, but the problem is it doesn't allow me to use debug:</p>
  
  <pre><code> include Sidekiq::Worker
  
    def sidekiq_logger
       @@sidekiq_logger ||= Logger.new("#{Rails.root}/log/sidekiq.log")
     end
  
    def perform(report_id)
      report = Report.find(report_id)
  
      distance = report.distance_formatted(report.unit)
      sidekiq_logger.debug = "#{DateTime.now.to_s(:db)}: #{distance} processed for report #{report.id}"
  
      report.update_attribute(:processed, true)
    end 
  </code></pre>
  
  <p>exception raised:</p>
  
  <pre><code>2013-07-16T13:17:35Z 10803 TID-tfkn8 ReportsWorker JID-e8f0f8a52277238c4851f231 INFO: fail: 0.007 sec
  2013-07-16T13:17:35Z 10803 TID-tfkn8 WARN: {"retry"=&gt;true, "queue"=&gt;"default", "class"=&gt;"ReportsWorker", "args"=&gt;[317$
  2013-07-16T13:17:35Z 10803 TID-tfkn8 WARN: undefined method `debug=' for #&lt;Logger:0x00000006174d40&gt;
  </code></pre>
  
  <p>How do I use debug then?</p>