def close( *args )
      return self if @io.nil?
      super

      io, @io = @io, nil
      unless [STDIN, STDERR, STDOUT].include?(io)
        io.send(@close_method) if @close_method and io.respond_to? @close_method
      end
    rescue IOError
    ensure
      return self
    end
def close( *args )
      return self if @io.nil?
      super

      io, @io = @io, nil
      unless [STDIN, STDERR, STDOUT].include?(io)
        io.send(@close_method) if @close_method and io.respond_to? @close_method
      end
    rescue IOError
    ensure
      return self
    end
call-seq:
    IO.new( name, io )
    IO.new( name, io, :layout => layout )

 Creates a new IO Appender using the given name that will use the _io_
 stream as the logging destination.

 call-seq:
    close( footer = true )

 Close the appender and writes the layout footer to the logging
 destination if the _footer_ flag is set to +true+. Log events will
 no longer be written to the logging destination after the appender
 is closed.