code: func (loglevel *Loglevel) UnmarshalYAML(unmarshal func(interface{}) error) error {
  	var loglevelString string
  	err := unmarshal(&loglevelString)
  	if err != nil {
  		return err
  	}
  
  	loglevelString = strings.ToLower(loglevelString)
  	switch loglevelString {
  	case "error", "warn", "info", "debug":
  	default:
  		return fmt.Errorf("invalid loglevel %s Must be one of [error, warn, info, debug]", loglevelString)
  	}
  
  	*loglevel = Loglevel(loglevelString)
  	return nil
  }
docs: // UnmarshalYAML implements the yaml.Umarshaler interface
  // Unmarshals a string into a Loglevel, lowercasing the string and validating that it represents a
  // valid loglevel