# File lib/fluent/supervisor.rb, line 78 def self.default_options { :config_path => Fluent::DEFAULT_CONFIG_PATH, :plugin_dirs => [Fluent::DEFAULT_PLUGIN_DIR], :log_level => Fluent::Log::LEVEL_INFO, :log_path => nil, :daemonize => nil, :libs => [], :setup_path => nil, :chuser => nil, :chgroup => nil, :suppress_interval => 0, :suppress_repeated_stacktrace => false, :without_source => false, :use_v1_config => false, } end
# File lib/fluent/supervisor.rb, line 32 def self.get_etc_group(group) if group.to_i.to_s == group Etc.getgrgid(group.to_i) else Etc.getgrnam(group) end end
# File lib/fluent/supervisor.rb, line 24 def self.get_etc_passwd(user) if user.to_i.to_s == user Etc.getpwuid(user.to_i) else Etc.getpwnam(user) end end
# File lib/fluent/supervisor.rb, line 96 def initialize(opt) @daemonize = opt[:daemonize] @config_path = opt[:config_path] @inline_config = opt[:inline_config] @use_v1_config = opt[:use_v1_config] @log_path = opt[:log_path] @dry_run = opt[:dry_run] @libs = opt[:libs] @plugin_dirs = opt[:plugin_dirs] @chgroup = opt[:chgroup] @chuser = opt[:chuser] apply_system_config(opt) @log_level = opt[:log_level] @suppress_interval = opt[:suppress_interval] @suppress_config_dump = opt[:suppress_config_dump] @without_source = opt[:without_source] log_opts = {:suppress_repeated_stacktrace => opt[:suppress_repeated_stacktrace]} @log = LoggerInitializer.new(@log_path, @log_level, @chuser, @chgroup, log_opts) @finished = false @main_pid = nil end
# File lib/fluent/supervisor.rb, line 142 def options { 'config_path' => @config_path, 'pid_file' => @daemonize, 'plugin_dirs' => @plugin_dirs, 'log_path' => @log_path } end
# File lib/fluent/supervisor.rb, line 121 def start @log.init dry_run if @dry_run start_daemonize if @daemonize install_supervisor_signal_handlers until @finished supervise do read_config change_privilege init_engine install_main_process_signal_handlers run_configure finish_daemonize if @daemonize run_engine exit 0 end $log.error "fluentd main process died unexpectedly. restarting." unless @finished end end
Generated with the Darkfish Rdoc Generator 2.