engine: graph, resources: Clean up log messages

The idea is to have a better user experience in the terminal.
This commit is contained in:
James Shubin
2024-08-06 15:12:10 -04:00
parent e94f39bf2c
commit 80178422db
13 changed files with 49 additions and 48 deletions

View File

@@ -192,10 +192,14 @@ func (obj *Engine) Process(ctx context.Context, vertex pgraph.Vertex) error {
} else {
// run the CheckApply!
obj.Logf("%s: CheckApply(%t)", res, !noop)
if obj.Debug {
obj.Logf("%s: CheckApply(%t)", res, !noop)
}
// if this fails, don't UpdateTimestamp()
checkOK, err = res.CheckApply(ctx, !noop)
obj.Logf("%s: CheckApply(%t): Return(%t, %s)", res, !noop, checkOK, engineUtil.CleanError(err))
if !checkOK && obj.Debug { // don't log on (checkOK == true)
obj.Logf("%s: CheckApply(%t): Return(%t, %s)", res, !noop, checkOK, engineUtil.CleanError(err))
}
}
if checkOK && err != nil { // should never return this way