Class: Fluent::Compat::TextParser::RegexpParser

Inherits:
Plugin::RegexpParser show all
Defined in:
lib/fluent/compat/parser.rb

Constant Summary

Constants included from Fluent::Compat::TypeConverter

Fluent::Compat::TypeConverter::Converters

Constants inherited from Plugin::Parser

Plugin::Parser::TimeParser

Constants included from Fluent::Configurable

Fluent::Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary

Attributes inherited from Plugin::Parser

#estimate_current_event

Attributes inherited from Plugin::Base

#under_plugin_development

Instance Method Summary collapse

Methods inherited from Plugin::RegexpParser

#configure, #parse

Methods included from Fluent::Compat::TypeConverter

#configure, included

Methods inherited from Plugin::Parser

#call, #parse

Methods included from TimeMixin::Parser

included, #time_parser_create

Methods included from Plugin::OwnedByMixin

#log, #owner, #owner=

Methods inherited from Plugin::Base

#after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #close, #closed?, #configure, #configured?, #has_router?, #inspect, #shutdown, #shutdown?, #start, #started?, #stop, #stopped?, #terminate, #terminated?

Methods included from SystemConfig::Mixin

#system_config, #system_config_override

Methods included from Fluent::Configurable

#config, #configure, included, lookup_type, register_type

Constructor Details

#initialize(regexp, conf = {}) ⇒ RegexpParser

TODO: warn when deprecated



125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/fluent/compat/parser.rb', line 125

def initialize(regexp, conf = {})
  super()

  unless conf.empty?
    unless conf.is_a?(Config::Element)
      conf = Config::Element.new('default_regexp_conf', '', conf, [])
    end
    configure(conf)
  end

  @regexp = regexp
end

Instance Method Details

#patternsObject



138
139
140
# File 'lib/fluent/compat/parser.rb', line 138

def patterns
  {'format' => @regexp, 'time_format' => @time_format}
end