Module: Fluent::Plugin::Newline::Mixin

Includes:
Configurable
Included in:
HashFormatter, JSONFormatter, LabeledTSVFormatter, OutFileFormatter, SingleValueFormatter, TSVFormatter
Defined in:
lib/fluent/plugin/formatter.rb

Constant Summary collapse

DEFAULT_NEWLINE =
if Fluent.windows?
  :crlf
else
  :lf
end

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Method Summary collapse

Methods included from Configurable

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

Instance Method Details

#configure(conf) ⇒ Object



63
64
65
66
67
68
69
70
71
# File 'lib/fluent/plugin/formatter.rb', line 63

def configure(conf)
  super
  @newline = case newline
             when :lf
               "\n".freeze
             when :crlf
               "\r\n".freeze
             end
end