Class: Octave::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/octave/configuration.rb

Overview

Handle the configuration of the Octave agent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



22
23
24
25
26
# File 'lib/octave/configuration.rb', line 22

def initialize
  @max_queue = 1500
  @logger = Logger.new(STDOUT)
  @enabled = true
end

Instance Attribute Details

#dispatchersObject



28
29
30
31
32
# File 'lib/octave/configuration.rb', line 28

def dispatchers
  @dispatchers ||= [
    Octave::Dispatcher::Logger.new
  ]
end

#enabled=(value) ⇒ Object (writeonly)

Enable the agent. Default is true.



20
21
22
# File 'lib/octave/configuration.rb', line 20

def enabled=(value)
  @enabled = value
end

#loggerObject

Logger to be used for logging events and debugging. Default is Logger.new(STDOUT).



12
13
14
# File 'lib/octave/configuration.rb', line 12

def logger
  @logger
end

#max_queueNumeric

Maximum size of the queue. Default is 1500

Returns:

  • (Numeric)


8
9
10
# File 'lib/octave/configuration.rb', line 8

def max_queue
  @max_queue
end

Instance Method Details

#enabled?Boolean

Returns Whether or not the agent is enabled.

Returns:

  • (Boolean)

    Whether or not the agent is enabled



35
36
37
# File 'lib/octave/configuration.rb', line 35

def enabled?
  @enabled
end