config/initializers/split_sidekiq_log.rb

module Sidekiq
  module Logging
    class << self
      @@counter = -1

      alias :previous_logger :logger

      def ttid
        Thread.current[:sidekiq_ttid] ||= (@@counter += 1)
      end

      def logger
        Thread.current[:sidekiq_logger] ||= _logger
      end

      def _logger
        logdev = previous_logger.instance_variable_get(:@logdev)
        return previous_logger if logdev.dev == STDOUT
        ext = File.extname(logdev.dev.path)
        path = logdev.dev.path.gsub /#{Regexp.escape(ext)}$/, ".#{ttid}#{ext}"
        Logger.new(path)
      end
    end

  end
end

application_job.rb

class ApplicationJob < ActiveJob::Base
  def logger
    Thread.current[:sidekiq_logger] || Sidekiq::Logging.logger
  end
end