refactor: fix log style and add recipe context

This commit is contained in:
decentral1se 2021-12-19 23:08:03 +01:00
parent fdc9e8b5fd
commit f5caf5587a
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ func LoadComposefile(opts Deploy, appEnv map[string]string) (*composetypes.Confi
config, err := loader.Load(configDetails, DontSkipValidation)
if err != nil {
if fpe, ok := err.(*loader.ForbiddenPropertiesError); ok {
return nil, fmt.Errorf("compose file contains unsupported options:\n\n%s",
return nil, fmt.Errorf("compose file contains unsupported options: %s",
propertyWarnings(fpe.Properties))
}
return nil, err
@ -37,14 +37,14 @@ func LoadComposefile(opts Deploy, appEnv map[string]string) (*composetypes.Confi
unsupportedProperties := loader.GetUnsupportedProperties(dicts...)
if len(unsupportedProperties) > 0 {
logrus.Warnf("Ignoring unsupported options: %s\n\n",
strings.Join(unsupportedProperties, ", "))
logrus.Warnf("%s: ignoring unsupported options: %s",
appEnv["TYPE"], strings.Join(unsupportedProperties, ", "))
}
deprecatedProperties := loader.GetDeprecatedProperties(dicts...)
if len(deprecatedProperties) > 0 {
logrus.Warnf("Ignoring deprecated options:\n\n%s\n\n",
propertyWarnings(deprecatedProperties))
logrus.Warnf("%s: ignoring deprecated options: %s",
appEnv["TYPE"], propertyWarnings(deprecatedProperties))
}
return config, nil
}