Class: Fluent::Label
Constant Summary
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary collapse
-
#root_agent ⇒ Object
Returns the value of attribute root_agent.
Attributes inherited from Agent
#context, #error_collector, #event_router, #filters, #log, #outputs
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit_error_event(tag, time, record, e) ⇒ Object
- #handle_emits_error(tag, es, e) ⇒ Object
-
#initialize(name, log:) ⇒ Label
constructor
A new instance of Label.
Methods inherited from Agent
#add_filter, #add_match, #lifecycle, #lifecycle_control_list
Methods included from Configurable
#config, #configure_proxy_generate, #configured_section_create, included, lookup_type, register_type
Constructor Details
#initialize(name, log:) ⇒ Label
Returns a new instance of Label.
21 22 23 24 25 26 |
# File 'lib/fluent/label.rb', line 21 def initialize(name, log:) super(log: log) @context = name @root_agent = nil end |
Instance Attribute Details
#root_agent ⇒ Object
Returns the value of attribute root_agent.
28 29 30 |
# File 'lib/fluent/label.rb', line 28 def root_agent @root_agent end |
Instance Method Details
#configure(conf) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/fluent/label.rb', line 30 def configure(conf) super if conf.elements('match').size == 0 raise ConfigError, "Missing <match> sections in <label #{@context}> section" end end |
#emit_error_event(tag, time, record, e) ⇒ Object
38 39 40 |
# File 'lib/fluent/label.rb', line 38 def emit_error_event(tag, time, record, e) @root_agent.emit_error_event(tag, time, record, e) end |
#handle_emits_error(tag, es, e) ⇒ Object
42 43 44 |
# File 'lib/fluent/label.rb', line 42 def handle_emits_error(tag, es, e) @root_agent.handle_emits_error(tag, es, e) end |