Class: Fluent::DebugInput

Inherits:
Input
  • Object
show all
Defined in:
lib/fluent/plugin/in_debug.rb

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object



8
9
10
11
# File 'lib/fluent/plugin/in_debug.rb', line 8

def configure(conf)
  super
  Debuggable.extend_configure(::Fluent::Output)
end

#startObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/fluent/plugin/in_debug.rb', line 13

def start
  # Engine.matches are created after input plugins are configured, so matches are empty in #configure
  # cf. https://github.com/fluent/fluentd/blob/56f198ecf5ca95dcddef7bdc21b5a309468670e3/lib/fluent/engine.rb#L123
  # #start is called after that, so we can access to Engine.matches here
  super
  if @debug_all
    Engine.matches.each do |match|
      Debuggable.extend_emit(match.output)
    end
  end
end