Class: Restash::Conf

Inherits:
Object
  • Object
show all
Defined in:
lib/restash/conf.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.extra_optionsObject

Returns the value of attribute extra_options.



8
9
10
# File 'lib/restash/conf.rb', line 8

def extra_options
  @extra_options
end

.logstash_hostObject

Returns the value of attribute logstash_host.



8
9
10
# File 'lib/restash/conf.rb', line 8

def logstash_host
  @logstash_host
end

.logstash_portObject

Returns the value of attribute logstash_port.



8
9
10
# File 'lib/restash/conf.rb', line 8

def logstash_port
  @logstash_port
end

.message_mutatorObject

Returns the value of attribute message_mutator.



8
9
10
# File 'lib/restash/conf.rb', line 8

def message_mutator
  @message_mutator
end

.optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/restash/conf.rb', line 8

def options
  @options
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Restash::Conf)

    the object that the method was called on



10
11
12
13
14
# File 'lib/restash/conf.rb', line 10

def configure
  self.extra_options = {}
  yield self
  true
end

.loggerObject



16
17
18
# File 'lib/restash/conf.rb', line 16

def logger
  @logger ||= Restash::Logger.new(logstash_host, logstash_port, options)
end