Class: Octave::Configuration
- Inherits:
-
Object
- Object
- Octave::Configuration
- Defined in:
- lib/octave/configuration.rb
Overview
Handle the configuration of the Octave agent.
Instance Attribute Summary collapse
- #dispatchers ⇒ Object
-
#enabled ⇒ Object
writeonly
Enable the agent.
-
#logger ⇒ Object
Logger to be used for logging events and debugging.
-
#max_queue ⇒ Numeric
Maximum size of the queue.
Instance Method Summary collapse
-
#enabled? ⇒ Boolean
Whether or not the agent is enabled.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#dispatchers ⇒ Object
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 |
#logger ⇒ Object
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_queue ⇒ Numeric
Maximum size of the queue. Default is 1500
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.
35 36 37 |
# File 'lib/octave/configuration.rb', line 35 def enabled? @enabled end |