Sha256: fadf4b0ed531df224033ce8f53183312ac4f661b709bc9431b85f4b73402b55e

Contents?: true

Size: 1.55 KB

Versions: 10

Compression:

Stored size: 1.55 KB

Contents

module Logging
  module Appenders

    # call-seq:
    #    Appenders[name]
    #
    # Returns the appender instance stored in the appender hash under the
    # key _name_, or +nil+ if no appender has been created using that name.
    #
    def []( name ) @appenders[name] end

    # call-seq:
    #    Appenders[name] = appender
    #
    # Stores the given _appender_ instance in the appender hash under the
    # key _name_.
    #
    def []=( name, value ) @appenders[name] = value end

    # call-seq:
    #    Appenders.remove( name )
    #
    # Removes the appender instance stored in the appender hash under the
    # key _name_.
    #
    def remove( name ) @appenders.delete(name) end

    # call-seq:
    #    each {|appender| block}
    #
    # Yield each appender to the _block_.
    #
    def each( &block )
      @appenders.values.each(&block)
      return nil
    end

    # :stopdoc:
    def reset
      @appenders.values.each {|appender|
        next if appender.nil?
        appender.close
      }
      @appenders.clear
      return nil
    end
    # :startdoc:

    extend self
    @appenders = Hash.new
  end  # Appenders

  require libpath('logging/appenders/buffering')
  require libpath('logging/appenders/io')
  require libpath('logging/appenders/console')
  require libpath('logging/appenders/email')
  require libpath('logging/appenders/file')
  require libpath('logging/appenders/growl')
  require libpath('logging/appenders/rolling_file')
  require libpath('logging/appenders/string_io')
  require libpath('logging/appenders/syslog')
end  # Logging

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/logging-1.8.2/lib/logging/appenders.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/logging-1.8.2/lib/logging/appenders.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/logging-1.8.2/lib/logging/appenders.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/logging-1.8.1/lib/logging/appenders.rb
logging-1.8.2 lib/logging/appenders.rb
logging-1.8.1 lib/logging/appenders.rb
logging-1.8.0 lib/logging/appenders.rb
logging-1.7.2 lib/logging/appenders.rb
logging-1.7.1 lib/logging/appenders.rb
logging-1.7.0 lib/logging/appenders.rb