From f5caf5587ac23fe712c38a6a713cc04ca073e0a1 Mon Sep 17 00:00:00 2001 From: cellarspoon Date: Sun, 19 Dec 2021 23:08:03 +0100 Subject: [PATCH] refactor: fix log style and add recipe context --- pkg/upstream/stack/loader.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/upstream/stack/loader.go b/pkg/upstream/stack/loader.go index 369244de..5686c4c2 100644 --- a/pkg/upstream/stack/loader.go +++ b/pkg/upstream/stack/loader.go @@ -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 }