Class: Metrics::LoggerReporter
- Defined in:
- lib/liquid/metrics/logger_reporter.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#marker ⇒ Object
Returns the value of attribute marker.
Attributes inherited from Reporter
#duration_unit, #filter, #rate_unit
Instance Method Summary collapse
-
#initialize(registry) ⇒ LoggerReporter
constructor
A new instance of LoggerReporter.
- #report_counter(name, counter) ⇒ Object
- #report_gauge(name, gauge) ⇒ Object
- #report_histogram(name, histogram) ⇒ Object
- #report_meter(name, meter) ⇒ Object
- #report_timer(name, timer) ⇒ Object
Methods inherited from Reporter
#convert_duration, #convert_rate, #report_counters, #report_gauges, #report_histograms, #report_meters, #report_timers, #run, #start, #stop
Constructor Details
#initialize(registry) ⇒ LoggerReporter
Returns a new instance of LoggerReporter.
9 10 11 12 13 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 9 def initialize(registry) super @logger = $log @marker = "metriks:" end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 6 def logger @logger end |
#marker ⇒ Object
Returns the value of attribute marker.
7 8 9 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 7 def marker @marker end |
Instance Method Details
#report_counter(name, counter) ⇒ Object
19 20 21 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 19 def report_counter(name, counter) @logger.info(@marker, super) end |
#report_gauge(name, gauge) ⇒ Object
15 16 17 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 15 def report_gauge(name, gauge) @logger.info(@marker, super) end |
#report_histogram(name, histogram) ⇒ Object
23 24 25 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 23 def report_histogram(name, histogram) @logger.info(@marker, super) end |
#report_meter(name, meter) ⇒ Object
27 28 29 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 27 def report_meter(name, meter) @logger.info(@marker, super) end |
#report_timer(name, timer) ⇒ Object
31 32 33 |
# File 'lib/liquid/metrics/logger_reporter.rb', line 31 def report_timer(name, timer) @logger.info(@marker, super) end |