Class: Fluent::Plugin::Parser
- Includes:
- OwnedByMixin, TimeMixin::Parser
- Defined in:
- lib/fluent/plugin/parser.rb
Direct Known Subclasses
Compat::Parser, Apache2Parser, JSONParser, MultilineParser, NoneParser, RegexpParser, SyslogParser, ValuesParser
Defined Under Namespace
Classes: ParserError
Constant Summary collapse
- TimeParser =
Fluent::TimeParser
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary collapse
-
#estimate_current_event ⇒ Object
SET false BEFORE CONFIGURE, to return nil when time not parsed.
Attributes inherited from Base
Instance Method Summary collapse
- #call(*a, &b) ⇒ Object
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
- #parse(text) ⇒ Object
Methods included from TimeMixin::Parser
Methods included from OwnedByMixin
Methods inherited from 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 Configurable
#config, #configure, included, lookup_type, register_type
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
39 40 41 42 |
# File 'lib/fluent/plugin/parser.rb', line 39 def initialize super @estimate_current_event = true end |
Instance Attribute Details
#estimate_current_event ⇒ Object
SET false BEFORE CONFIGURE, to return nil when time not parsed
35 36 37 |
# File 'lib/fluent/plugin/parser.rb', line 35 def estimate_current_event @estimate_current_event end |
Instance Method Details
#call(*a, &b) ⇒ Object
48 49 50 51 52 |
# File 'lib/fluent/plugin/parser.rb', line 48 def call(*a, &b) # Keep backward compatibility for existing plugins # TODO: warn when deprecated parse(*a, &b) end |
#parse(text) ⇒ Object
44 45 46 |
# File 'lib/fluent/plugin/parser.rb', line 44 def parse(text) raise NotImplementedError, "Implement this method in child class" end |