Skip to content

Commit 333fae6

Browse files
authored
Merge pull request #330 from daniel-hutao/main
fix: trello logs improvement
2 parents cd9e502 + dbeec0d commit 333fae6

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

internal/pkg/pluginengine/change.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func execute(smgr statemanager.Manager, changes []*Change) map[string]error {
110110
var err error
111111
var returnValue map[string]interface{}
112112

113-
log.Infof("Tool's raw changes are: %s.", c.Tool.Options)
113+
log.Debugf("Tool's raw changes are: %s.", c.Tool.Options)
114114
// fill ref inputs
115115
err = fillRefValueWithOutputs(smgr, c.Tool.Options)
116116
if err != nil {
@@ -148,6 +148,7 @@ func execute(smgr statemanager.Manager, changes []*Change) map[string]error {
148148
errorsMap["handle-result"] = err
149149
}
150150
}
151+
log.Separatorf("Processing done.")
151152

152153
return errorsMap
153154
}

internal/pkg/pluginengine/cmd_apply.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func Apply(configFile string, continueDirectly bool) error {
5353
errsMap := execute(smgr, changes)
5454
if len(errsMap) != 0 {
5555
for k, e := range errsMap {
56-
log.Infof("%s -> %s", k, e)
56+
log.Errorf("%s -> %s", k, e)
5757
}
5858
return errors.New("some error(s) occurred during plugins apply process")
5959
}

pkg/util/log/log.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,14 @@ func Success(args ...interface{}) {
8686
logrus.Info(args...)
8787
}
8888

89-
// Separator prints a line for separating as green color
89+
// Separatorf prints a line for separating as green color
9090
func Separatorf(format string, args ...interface{}) {
9191
logrus.SetFormatter(separatorLog)
9292
logrus.Infof(format, args...)
9393
}
94+
95+
// Separator prints a line for separating as green color
96+
func Separator(args ...interface{}) {
97+
logrus.SetFormatter(separatorLog)
98+
logrus.Info(args...)
99+
}

0 commit comments

Comments
 (0)