def append( event )
    if @closed
      raise RuntimeError,
            "appender '<#{self.class.name}: #{@name}>' is closed"
    end

    # only append if the event level is less than or equal to the configured
    # appender level and the filter does not disallow it
    if event = allow(event)
      begin
        write(event)
      rescue StandardError => err
        ::Logging.log_internal_error(err)
      end
    end

    self
  end
def append( event )
    if @closed
      raise RuntimeError,
            "appender '<#{self.class.name}: #{@name}>' is closed"
    end

    # only append if the event level is less than or equal to the configured
    # appender level and the filter does not disallow it
    if event = allow(event)
      begin
        write(event)
      rescue StandardError => err
        ::Logging.log_internal_error(err)
      end
    end

    self
  end
call-seq:
    Appender.new( name )
    Appender.new( name, :layout => layout )

 Creates a new appender using the given name. If no Layout is specified,
 then a Basic layout will be used. Any logging header supplied by the
 layout will be written to the logging destination when the Appender is
 created.

 Options:

    :layout   => the layout to use when formatting log events
    :level    => the level at which to log
    :encoding => encoding to use when writing messages (defaults to UTF-8)
    :filters  => filters to apply to events before processing

 call-seq:
    append( event )

 Write the given _event_ to the logging destination. The log event will
 be processed through the Layout associated with the Appender.