Class: Fluent::Parser
- Inherits:
-
Object
- Object
- Fluent::Parser
- Includes:
- Configurable
- Defined in:
- lib/fluent/parser.rb
Direct Known Subclasses
TextParser::ApacheParser, TextParser::JSONParser, TextParser::MultilineParser, TextParser::NoneParser, TextParser::RegexpParser, TextParser::SyslogParser, TextParser::ValuesParser
Constant Summary
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 ‘configure()’ may raise errors for unexpected configurations.
Instance Method Summary collapse
-
#call(*a, &b) ⇒ Object
Keep backward compatibility for existing plugins.
- #configure(conf) ⇒ Object
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
- #parse(text) ⇒ Object
Methods included from Configurable
#config, included, lookup_type, register_type
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
42 43 44 45 |
# File 'lib/fluent/parser.rb', line 42 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 ‘configure()’ may raise errors for unexpected configurations
38 39 40 |
# File 'lib/fluent/parser.rb', line 38 def estimate_current_event @estimate_current_event end |
Instance Method Details
#call(*a, &b) ⇒ Object
Keep backward compatibility for existing plugins
56 57 58 |
# File 'lib/fluent/parser.rb', line 56 def call(*a, &b) parse(*a, &b) end |
#configure(conf) ⇒ Object
47 48 49 |
# File 'lib/fluent/parser.rb', line 47 def configure(conf) super end |
#parse(text) ⇒ Object
51 52 53 |
# File 'lib/fluent/parser.rb', line 51 def parse(text) raise NotImplementedError, "Implement this method in child class" end |