Class: Metrics::Configuration
- Inherits:
-
Object
- Object
- Metrics::Configuration
- Defined in:
- lib/metrics/configuration.rb
Instance Attribute Summary collapse
-
#driver ⇒ Object
The driver to use.
-
#logger ⇒ Object
The stream source to write to.
-
#source ⇒ Object
The base source for all metrics.
Instance Method Summary collapse
Instance Attribute Details
#driver ⇒ Object
The driver to use.
Drivers are objects that implement the following method:
driver.write(*instrumenters) # => instrumenters written
Defaults to Metrics::Drivers::L2Met.new(logger, source).
12 13 14 |
# File 'lib/metrics/configuration.rb', line 12 def driver @driver end |
#logger ⇒ Object
The stream source to write to. Defaults to STDOUT.
15 16 17 |
# File 'lib/metrics/configuration.rb', line 15 def logger @logger end |
#source ⇒ Object
The base source for all metrics.
18 19 20 |
# File 'lib/metrics/configuration.rb', line 18 def source @source end |
Instance Method Details
#log_formatter ⇒ Object
28 29 30 |
# File 'lib/metrics/configuration.rb', line 28 def log_formatter proc { |severity, datetime, progname, msg| "#{msg}\n" } end |