class Fluent::Plugin::StdoutOutput

Constants

DEFAULT_FORMAT_TYPE
DEFAULT_LINE_FORMAT_TYPE

Attributes

formatter[RW]

Public Instance Methods

configure(conf) click to toggle source
Calls superclass method Fluent::Compat::Output#configure
# File lib/fluent/plugin/out_stdout.rb, line 49
def configure(conf)
  compat_parameters_convert(conf, :inject, :formatter)

  super

  @formatter = formatter_create
end
format(tag, time, record) click to toggle source
# File lib/fluent/plugin/out_stdout.rb, line 65
def format(tag, time, record)
  record = inject_values_to_record(tag, time, record)
  @formatter.format(tag, time, record).chomp + "\n"
end
multi_workers_ready?() click to toggle source
# File lib/fluent/plugin/out_stdout.rb, line 43
def multi_workers_ready?
  true
end
prefer_buffered_processing() click to toggle source
# File lib/fluent/plugin/out_stdout.rb, line 39
def prefer_buffered_processing
  false
end
process(tag, es) click to toggle source
# File lib/fluent/plugin/out_stdout.rb, line 57
def process(tag, es)
  es = inject_values_to_event_stream(tag, es)
  es.each {|time,record|
    $log.write(format(tag, time, record))
  }
  $log.flush
end
write(chunk) click to toggle source
# File lib/fluent/plugin/out_stdout.rb, line 70
def write(chunk)
  chunk.write_to($log)
end