code: func (c *cmd) handleReload(agent *agent.Agent, cfg *config.RuntimeConfig) (*config.RuntimeConfig, error) {
  	c.logger.Println("[INFO] agent: Reloading configuration...")
  	var errs error
  	newCfg := c.readConfig()
  	if newCfg == nil {
  		errs = multierror.Append(errs, fmt.Errorf("Failed to reload configs"))
  		return cfg, errs
  	}
  
  	// Change the log level
  	minLevel := logutils.LogLevel(strings.ToUpper(newCfg.LogLevel))
  	if logger.ValidateLevelFilter(minLevel, c.logFilter) {
  		c.logFilter.SetMinLevel(minLevel)
  	} else {
  		errs = multierror.Append(fmt.Errorf(
  			"Invalid log level: %s. Valid log levels are: %v",
  			minLevel, c.logFilter.Levels))
  
  		// Keep the current log level
  		newCfg.LogLevel = cfg.LogLevel
  	}
  
  	if err := agent.ReloadConfig(newCfg); err != nil {
  		errs = multierror.Append(fmt.Errorf(
  			"Failed to reload configs: %v", err))
  	}
  
  	return newCfg, errs
  }
docs: // handleReload is invoked when we should reload our configs, e.g. SIGHUP