title: Getting Sidekiq to work with papertrail
body: <p>I try to move all the logging of my rails (3.2.17) app in production and staging to papertrail. Now I'm trying to set the logger for sidekiq in <code>config/initializers/sidekiq.rb</code> like this:</p>
  
  <pre><code>Sidekiq.configure_server do |config|
    Sidekiq::Logging.logger = RemoteSyslogLogger.new('logs.papertrailapp.com', ENV.fetch('PAPERTRAIL_PORT'), program: "sidekiq-#{Rails.env}")
  end
  </code></pre>
  
  <p>When I try to start sidekiq with:</p>
  
  <pre><code>bundle exec sidekiq --index 0 --pidfile &lt;PATH_TO_PID&gt; --environment staging --daemon
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>You really should set a logfile if you're going to daemonize
  ...bundle/ruby/2.0.0/gems/sidekiq-2.17.4/lib/sidekiq/cli.rb:141:in `daemonize'
  ...bundle/ruby/2.0.0/gems/sidekiq-2.17.4/lib/sidekiq/cli.rb:39:in `parse'
  ...bundle/ruby/2.0.0/gems/sidekiq-2.17.4/bin/sidekiq:7:in `&lt;top (required)&gt;'
  ...bundle/ruby/2.0.0/bin/sidekiq:23:in `load'
  ...bundle/ruby/2.0.0/bin/sidekiq:23:in `&lt;main&gt;'
  </code></pre>
  
  <p>However if I give sidekiq a dummy for logging first:</p>
  
  <pre><code>bundle exec sidekiq --index 0 --pidfile &lt;PATH_TO_PID&gt; --environment staging --daemon --logfile /dev/null
  </code></pre>
  
  <p>it works like a charm (logs are sent to papertrail), since the initializer seems to override the previous option.</p>
  
  <p>But I find this approach quite ugly. Anybody got a <strong>cleaner approach</strong> to this?</p>