Class: VCAP::Logging::Sink::StdioSink

Inherits:
BaseSink
  • Object
show all
Defined in:
lib/vcap/logging/sink/stdio_sink.rb

Overview

A sink for writing to stderr/stdout Usage:

stdout_sink = VCAP::Logging::Sink::StdioSink.new(STDOUT)

Instance Attribute Summary

Attributes inherited from BaseSink

#autoflush, #formatter, #opened

Instance Method Summary collapse

Methods inherited from BaseSink

#add_record, #close, #flush, #open

Constructor Details

#initialize(io, formatter = nil) ⇒ StdioSink

Returns a new instance of StdioSink.



10
11
12
13
14
# File 'lib/vcap/logging/sink/stdio_sink.rb', line 10

def initialize(io, formatter=nil)
  super(formatter)
  @io  = io
  open
end