func validateLogOptCompatability()

in logger/awslogs/logger.go [180:201]


func validateLogOptCompatability(cfg map[string]string) error {
	_, datetimeFormatKeyExists := cfg[DatetimeFormatKey]
	_, multilinePatternKeyExists := cfg[MultilinePatternKey]

	if cfg[LogFormatKey] != "" {
		// Only json/emf is supported at the moment.
		if cfg[LogFormatKey] != JSONEmfLogFormat {
			return fmt.Errorf("unsupported log format '%s'", cfg[LogFormatKey])
		}
		if datetimeFormatKeyExists || multilinePatternKeyExists {
			return fmt.Errorf(
				"you cannot configure log opt '%s' or '%s' when log opt '%s' is set to '%s'",
				DatetimeFormatKey,
				MultilinePatternKey,
				LogFormatKey,
				JSONEmfLogFormat,
			)
		}
	}

	return nil
}