Class: Fluent::Rds_LogInput

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

Instance Method Summary collapse

Constructor Details

#initializeRds_LogInput

Returns a new instance of Rds_LogInput.



19
20
21
22
# File 'lib/fluent/plugin/in_rds_log.rb', line 19

def initialize
  super
  require 'mysql2'
end

Instance Method Details

#configure(conf) ⇒ Object



24
25
26
27
28
29
# File 'lib/fluent/plugin/in_rds_log.rb', line 24

def configure(conf)
  super
  if @log_type.nil?
    $log.error "fluent-plugin-rds-log: missing parameter log_type is {slow_log|general_log}"
  end
end

#shutdownObject



36
37
38
39
40
# File 'lib/fluent/plugin/in_rds_log.rb', line 36

def shutdown
  super
  @watcher.terminate
  @watcher.join
end

#startObject



31
32
33
34
# File 'lib/fluent/plugin/in_rds_log.rb', line 31

def start
  super
  @watcher = Thread.new(&method(:watch))
end