Class: MultiStatsd::Backend::Stdout

Inherits:
Base
  • Object
show all
Defined in:
lib/multi-statsd/backends/stdout.rb

Overview

Example backend which prints out the all stats to stdout

Instance Attribute Summary

Attributes inherited from Base

#counters, #gauges, #name, #timers

Instance Method Summary collapse

Methods inherited from Base

#flush_interval, #format_key, #initialize, #post_init, #reset_stats, #write

Constructor Details

This class inherits a constructor from MultiStatsd::Backend::Base

Instance Method Details

#flushnil

Prints the name of this backend, the current time, and inspected stats to stdout

Returns:

  • (nil)


5
6
7
# File 'lib/multi-statsd/backends/stdout.rb', line 5

def flush
  $stdout.puts "[#{@name}:#{Time.now.to_i}] #{reset_stats.inspect}"
end