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

#error_logger, #io, #sync

Instance Method Summary collapse

Methods inherited from Base

#close, #close!, #flush, #to_io, #unrecoverable_error?, #write, #write_batch, #write_one

Constructor Details

#initialize(opts) ⇒ 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