Class: Fluent::Supervisor

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/format/check.rb

Instance Method Summary collapse

Instance Method Details

#ext_dry_runObject

Extended to accept IO object



40
41
42
43
44
45
46
47
48
49
# File 'lib/fluent/format/check.rb', line 40

def ext_dry_run
  ext_read_config
  change_privilege
  init_engine
  install_main_process_signal_handlers
  run_configure
  true
rescue => e
  false
end

#ext_read_configObject

Extended to accept IO object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/fluent/format/check.rb', line 52

def ext_read_config
  if @config_path.respond_to?(:read) # IO object
    @config_data = @config_path.read
  else
    $log.info "reading config file", :path=>@config_path
    @config_fname = File.basename(@config_path)
    @config_basedir = File.dirname(@config_path)
    @config_data = File.read(@config_path)
  end
  if @inline_config == '-'
    @config_data << "\n" << STDIN.read
  elsif @inline_config
    @config_data << "\n" << @inline_config.gsub("\\n","\n")
  end
end