class Fluent::NamedPipeOutput
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_named_pipe.rb, line 14 def configure(conf) super begin @pipe = PluginNamedPipe::Fifo.new(@path, :w) rescue => e raise ConfigError, "#{e.class}: #{e.message}" end @formatter = Plugin.new_formatter(@format) @formatter.configure(conf) end
emit(tag, es, chain)
click to toggle source
# File lib/fluent/plugin/out_named_pipe.rb, line 31 def emit(tag, es, chain) es.each do |time, record| @pipe.write @formatter.format(tag, time, record) @pipe.flush end chain.next rescue => e log.error "out_named_pipe: unexpected error", :error_class => e.class, :error => e.to_s log.error_backtrace end
shutdown()
click to toggle source
# File lib/fluent/plugin/out_named_pipe.rb, line 27 def shutdown @pipe.close end