Class: Fluent::UnixInput

Inherits:
StreamInput show all
Defined in:
lib/fluent/plugin/in_stream.rb

Constant Summary

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary

Attributes inherited from Input

#router

Attributes included from PluginLoggerMixin

#log

Instance Method Summary collapse

Methods inherited from StreamInput

#initialize, #run, #shutdown, #start

Methods inherited from Input

#initialize, #shutdown, #start

Methods included from PluginLoggerMixin

included, #initialize

Methods included from PluginId

#plugin_id

Methods included from Configurable

#config, included, #initialize, lookup_type, register_type

Constructor Details

This class inherits a constructor from Fluent::StreamInput

Instance Method Details

#configure(conf) ⇒ Object



181
182
183
184
# File 'lib/fluent/plugin/in_stream.rb', line 181

def configure(conf)
  super
  #log.warn "'unix' input is obsoleted and will be removed. Use 'forward' instead."
end

#listenObject



186
187
188
189
190
191
192
193
194
195
# File 'lib/fluent/plugin/in_stream.rb', line 186

def listen
  if File.exist?(@path)
    File.unlink(@path)
  end
  FileUtils.mkdir_p File.dirname(@path)
  log.info "listening fluent socket on #{@path}"
  s = Coolio::UNIXServer.new(@path, Handler, log, method(:on_message))
  s.listen(@backlog) unless @backlog.nil?
  s
end