Sha256: 0bdba1a1128a767e127d8ca9f7a3696bbaa9e7fa81c81e443922de738858a051

Contents?: true

Size: 492 Bytes

Versions: 13

Compression:

Stored size: 492 Bytes

Contents

module LogStashLogger
  class << self
    def configure(&block)
      @configuration = Configuration.new(&block) if block_given? || @configuration.nil?
      @configuration
    end

    alias :configuration :configure
  end

  class Configuration
    attr_accessor :customize_event_block

    def initialize(*args)
      @customize_event_block = nil

      yield self if block_given?
      self
    end

    def customize_event(&block)
      @customize_event_block = block
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
logstash-logger-0.15.2 lib/logstash-logger/configuration.rb
logstash-logger-0.15.1 lib/logstash-logger/configuration.rb
logstash-logger-0.15.0 lib/logstash-logger/configuration.rb
logstash-logger-0.14.1 lib/logstash-logger/configuration.rb
logstash-logger-0.14.0 lib/logstash-logger/configuration.rb
logstash-logger-0.13.0 lib/logstash-logger/configuration.rb
logstash-logger-0.12.0 lib/logstash-logger/configuration.rb
logstash-logger-0.11.0 lib/logstash-logger/configuration.rb
logstash-logger-0.10.3 lib/logstash-logger/configuration.rb
logstash-logger-0.10.2 lib/logstash-logger/configuration.rb
logstash-logger-0.10.1 lib/logstash-logger/configuration.rb
logstash-logger-0.10.0 lib/logstash-logger/configuration.rb
logstash-logger-0.9.0 lib/logstash-logger/configuration.rb