Class: StatsdServer::Output::Stdout

Inherits:
Object
  • Object
show all
Defined in:
lib/statsdserver/output/stdout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Stdout

Returns a new instance of Stdout.



6
7
8
9
# File 'lib/statsdserver/output/stdout.rb', line 6

def initialize(opts = {})
  @logger = Logger.new(STDERR)
  $stdout.sync = true   # autoflush
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



3
4
5
# File 'lib/statsdserver/output/stdout.rb', line 3

def logger
  @logger
end

Instance Method Details

#send(str) ⇒ Object



12
13
14
# File 'lib/statsdserver/output/stdout.rb', line 12

def send(str)
  puts str
end