Class: Metrics::Configuration
- Inherits:
-
Object
- Object
- Metrics::Configuration
- Defined in:
- lib/metrics/configuration.rb
Instance Attribute Summary collapse
-
#formatter ⇒ Object
The formatter 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
#formatter ⇒ Object
The formatter to use. Only needs to be a class that responds to ‘to_s`. Defaults to Metrics::Formatter.
13 14 15 |
# File 'lib/metrics/configuration.rb', line 13 def formatter @formatter end |
#logger ⇒ Object
The stream source to write to. Defaults to STDOUT.
6 7 8 |
# File 'lib/metrics/configuration.rb', line 6 def logger @logger end |
#source ⇒ Object
The base source for all metrics.
9 10 11 |
# File 'lib/metrics/configuration.rb', line 9 def source @source end |
Instance Method Details
#log_formatter ⇒ Object
19 20 21 |
# File 'lib/metrics/configuration.rb', line 19 def log_formatter proc { |severity, datetime, progname, msg| "#{msg}\n" } end |