class Fluent::StdoutOutput
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
Fluent::Output#configure
# File lib/fluent/plugin/out_stdout.rb, line 23 def configure(conf) super @formatter = Plugin.new_formatter(@output_type) @formatter.configure(conf) end
emit(tag, es, chain)
click to toggle source
# File lib/fluent/plugin/out_stdout.rb, line 29 def emit(tag, es, chain) es.each {|time,record| $log.write "#{Time.at(time).localtime} #{tag}: #{@formatter.format(tag, time, record).chomp}\n" } $log.flush chain.next end