Input
# File lib/fluent/plugin/in_exec.rb, line 36 def configure(conf) super if localtime = conf['localtime'] @localtime = true elsif utc = conf['utc'] @localtime = false end if !@tag && !@tag_key raise ConfigError, "'tag' or 'tag_key' option is required on exec input" end @keys = @keys.split(',') if @time_key if @time_format f = @time_format @time_parse_proc = Proc.new {|str| Time.strptime(str, f).to_i } else @time_parse_proc = Proc.new {|str| str.to_i } end end end
# File lib/fluent/plugin/in_exec.rb, line 86 def run @io.each_line(&method(:each_line)) end
# File lib/fluent/plugin/in_exec.rb, line 90 def run_periodic until @finished sleep @run_interval io = IO.popen(@command, "r") io.each_line(&method(:each_line)) Process.waitpid(io.pid) end end
Generated with the Darkfish Rdoc Generator 2.