Class: Fluent::Plugin::LabeledTSVFormatter
- Defined in:
- lib/fluent/plugin/formatter_ltsv.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Formatter
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#format(tag, time, record) ⇒ Object
TODO: escaping for t in values.
Methods inherited from Formatter
Methods included from TimeMixin::Formatter
included, #time_formatter_create
Methods included from OwnedByMixin
Methods inherited from Base
#after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #close, #closed?, #configure, #configured?, #context_router, #context_router=, #fluentd_worker_id, #has_router?, #initialize, #inspect, #multi_workers_ready?, #plugin_root_dir, #shutdown, #shutdown?, #start, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?
Methods included from SystemConfig::Mixin
#system_config, #system_config_override
Methods included from Configurable
#config, #configure, #configure_proxy_generate, #configured_section_create, included, #initialize, lookup_type, register_type
Constructor Details
This class inherits a constructor from Fluent::Plugin::Base
Instance Method Details
#format(tag, time, record) ⇒ Object
TODO: escaping for t in values
31 32 33 34 35 36 37 38 39 |
# File 'lib/fluent/plugin/formatter_ltsv.rb', line 31 def format(tag, time, record) formatted = "" record.each do |label, value| formatted << @delimiter if formatted.length.nonzero? formatted << "#{label}#{@label_delimiter}#{value}" end formatted << "\n".freeze if @add_newline formatted end |