Class: Fluent::Compat::Filter
- Inherits:
-
Plugin::Filter
- Object
- Plugin::Base
- Plugin::Filter
- Fluent::Compat::Filter
- Defined in:
- lib/fluent/compat/filter.rb
Constant Summary
Constants included from Fluent::Configurable
Fluent::Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary
Attributes inherited from Plugin::Filter
Attributes included from PluginLoggerMixin
Attributes inherited from Plugin::Base
Instance Method Summary collapse
- #before_shutdown ⇒ Object
- #configure(conf) ⇒ Object
-
#initialize ⇒ Filter
constructor
A new instance of Filter.
- #shutdown ⇒ Object
-
#start ⇒ Object
These definitions are to get instance methods of superclass of 3rd party plugins to make it sure to call super.
Methods inherited from Plugin::Filter
#emit_records, #emit_size, #filter, #filter_stream, #filter_with_time, #measure_metrics, #statistics
Methods included from PluginHelper::Mixin
Methods included from PluginLoggerMixin
Methods included from PluginId
#plugin_id, #plugin_id_configured?, #plugin_id_for_test?, #plugin_root_dir, #stop
Methods inherited from Plugin::Base
#acquire_worker_lock, #after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown?, #called_in_test?, #close, #closed?, #configured?, #context_router, #context_router=, #fluentd_worker_id, #get_lock_path, #has_router?, #inspect, #multi_workers_ready?, #plugin_root_dir, #reloadable_plugin?, #shutdown?, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?
Methods included from SystemConfig::Mixin
#system_config, #system_config_override
Methods included from Fluent::Configurable
#config, #configure_proxy_generate, #configured_section_create, included, lookup_type, register_type
Constructor Details
#initialize ⇒ Filter
Returns a new instance of Filter.
30 31 32 33 34 35 |
# File 'lib/fluent/compat/filter.rb', line 30 def initialize super unless self.class.ancestors.include?(Fluent::Compat::CallSuperMixin) self.class.prepend Fluent::Compat::CallSuperMixin end end |
Instance Method Details
#before_shutdown ⇒ Object
59 60 61 |
# File 'lib/fluent/compat/filter.rb', line 59 def before_shutdown super end |
#configure(conf) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/fluent/compat/filter.rb', line 37 def configure(conf) ParserUtils.convert_parser_conf(conf) FormatterUtils.convert_formatter_conf(conf) super end |
#shutdown ⇒ Object
63 64 65 |
# File 'lib/fluent/compat/filter.rb', line 63 def shutdown super end |
#start ⇒ Object
These definitions are to get instance methods of superclass of 3rd party plugins to make it sure to call super
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fluent/compat/filter.rb', line 46 def start super if instance_variable_defined?(:@formatter) && @inject_config unless @formatter.class.ancestors.include?(Fluent::Compat::HandleTagAndTimeMixin) if @formatter.respond_to?(:owner) && !@formatter.owner @formatter.owner = self @formatter.singleton_class.prepend FormatterUtils::InjectMixin end end end end |