Class: LogStashLogger::Device::IO

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash-logger/device/io.rb

Direct Known Subclasses

Stderr, Stdout

Instance Attribute Summary

Attributes inherited from Base

#io, #sync

Instance Method Summary collapse

Methods inherited from Base

#close, #flush, #to_io, #write

Constructor Details

#initialize(opts) ⇒ IO

Returns a new instance of IO.



4
5
6
7
8
# File 'lib/logstash-logger/device/io.rb', line 4

def initialize(opts)
  super
  @io = opts[:io] || fail(ArgumentError, 'IO is required')
  @io.sync = sync unless sync.nil?
end