Class: Fluent::Output

Inherits:
Object
  • Object
show all
Includes:
Configurable, PluginId, PluginLoggerMixin
Defined in:
lib/fluent/output.rb

Constant Summary

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary collapse

Attributes included from PluginLoggerMixin

#log

Instance Method Summary collapse

Methods included from PluginLoggerMixin

included

Methods included from PluginId

#plugin_id

Methods included from Configurable

#config, included, lookup_type, register_type

Constructor Details

#initializeOutput

Returns a new instance of Output.



75
76
77
# File 'lib/fluent/output.rb', line 75

def initialize
  super
end

Instance Attribute Details

#routerObject

Returns the value of attribute router.



73
74
75
# File 'lib/fluent/output.rb', line 73

def router
  @router
end

Instance Method Details

#configure(conf) ⇒ Object



79
80
81
82
83
84
85
86
87
88
# File 'lib/fluent/output.rb', line 79

def configure(conf)
  super

  if label_name = conf['@label']
    label = Engine.root_agent.find_label(label_name)
    @router = label.event_router
  elsif @router.nil?
    @router = Engine.root_agent.event_router
  end
end

#secondary_init(primary) ⇒ Object

def emit(tag, es, chain) end



99
100
101
102
103
# File 'lib/fluent/output.rb', line 99

def secondary_init(primary)
  if primary.class != self.class
    $log.warn "type of secondary output should be same as primary output", primary: primary.class.to_s, secondary: self.class.to_s
  end
end

#shutdownObject



93
94
# File 'lib/fluent/output.rb', line 93

def shutdown
end

#startObject



90
91
# File 'lib/fluent/output.rb', line 90

def start
end