Class: Fluent::Compat::Output

Inherits:
Plugin::Output
  • Object
show all
Defined in:
lib/fluent/compat/output.rb

Instance Method Summary collapse

Constructor Details

#initializeOutput

Returns a new instance of Output.



167
168
169
170
171
172
# File 'lib/fluent/compat/output.rb', line 167

def initialize
  super
  unless self.class.ancestors.include?(Fluent::Compat::CallSuperMixin)
    self.class.prepend Fluent::Compat::CallSuperMixin
  end
end

Instance Method Details

#configure(conf) ⇒ Object



174
175
176
177
178
179
# File 'lib/fluent/compat/output.rb', line 174

def configure(conf)
  ParserUtils.convert_parser_conf(conf)
  FormatterUtils.convert_formatter_conf(conf)

  super
end

#process(tag, es) ⇒ Object



163
164
165
# File 'lib/fluent/compat/output.rb', line 163

def process(tag, es)
  emit(tag, es, NULL_OUTPUT_CHAIN)
end

#startObject



181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/fluent/compat/output.rb', line 181

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

#support_in_v12_style?(feature) ⇒ Boolean

Returns:

  • (Boolean)


154
155
156
157
158
159
160
161
# File 'lib/fluent/compat/output.rb', line 154

def support_in_v12_style?(feature)
  case feature
  when :synchronous    then true
  when :buffered       then false
  when :delayed_commit then false
  when :custom_format  then false
  end
end