def create_flusher_thread(flush_seconds) #:nodoc:
      if flush_seconds > 0
        begin
          logger = self
          Thread.new do
            loop do
              begin
                sleep(flush_seconds)
                logger.flush if Time.now - logger.last_flushed_at >= flush_seconds
              rescue => e
                STDERR.puts("Error flushing log: #{e.inspect}")
              end
            end
          end
        end
      end
    end
def create_flusher_thread(flush_seconds) #:nodoc:
      if flush_seconds > 0
        begin
          logger = self
          Thread.new do
            loop do
              begin
                sleep(flush_seconds)
                logger.flush if Time.now - logger.last_flushed_at >= flush_seconds
              rescue => e
                STDERR.puts("Error flushing log: #{e.inspect}")
              end
            end
          end
        end
      end
    end
Create a thread that will periodically call flush.