Class: Metrics::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#formatterObject

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

#loggerObject

The stream source to write to. Defaults to STDOUT.



6
7
8
# File 'lib/metrics/configuration.rb', line 6

def logger
  @logger
end

#sourceObject

The base source for all metrics.



9
10
11
# File 'lib/metrics/configuration.rb', line 9

def source
  @source
end

Instance Method Details

#log_formatterObject



19
20
21
# File 'lib/metrics/configuration.rb', line 19

def log_formatter
  proc { |severity, datetime, progname, msg| "#{msg}\n" }
end