Class: Fluent::Plugin::TSVFormatter

Inherits:
Formatter show all
Includes:
Newline::Mixin
Defined in:
lib/fluent/plugin/formatter_tsv.rb

Constant Summary

Constants included from Newline::Mixin

Newline::Mixin::DEFAULT_NEWLINE

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Constants inherited from Formatter

Formatter::PARSER_TYPES

Instance Attribute Summary

Attributes inherited from Base

#under_plugin_development

Instance Method Summary collapse

Methods included from Newline::Mixin

#configure

Methods included from Configurable

#config, #configure, #configure_proxy_generate, #configured_section_create, included, #initialize, lookup_type, register_type

Methods inherited from Formatter

#formatter_type

Methods included from TimeMixin::Formatter

included, #time_formatter_create

Methods included from OwnedByMixin

#log, #owner, #owner=

Methods inherited from Base

#acquire_worker_lock, #after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #called_in_test?, #close, #closed?, #configure, #configured?, #context_router, #context_router=, #fluentd_worker_id, #get_lock_path, #has_router?, #initialize, #inspect, #multi_workers_ready?, #plugin_root_dir, #reloadable_plugin?, #shutdown, #shutdown?, #start, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?

Methods included from SystemConfig::Mixin

#system_config, #system_config_override

Instance Method Details

#format(tag, time, record) ⇒ Object



33
34
35
36
37
# File 'lib/fluent/plugin/formatter_tsv.rb', line 33

def format(tag, time, record)
  formatted = @keys.map{|k| record[k].to_s }.join(@delimiter)
  formatted << @newline if @add_newline
  formatted
end