engine: graph, util: Clean up error printing

We should improve on this more, but at least as a quick fix, stop
splitting the error across two lines. This makes the logs really ugly.
This commit is contained in:
James Shubin
2023-09-01 16:49:50 -04:00
parent 0b1b0a3f80
commit 8299c04fc6
4 changed files with 18 additions and 7 deletions

View File

@@ -183,7 +183,7 @@ func (obj *Engine) Commit() error {
}
err := engine.Validate(res)
if obj.Debug {
obj.Logf("Validate(%s): Return(%+v)", res, err)
obj.Logf("Validate(%s): Return(%s)", res, engineUtil.CleanError(err))
}
if err != nil {
return errwrap.Wrapf(err, "the Res did not Validate")
@@ -239,7 +239,7 @@ func (obj *Engine) Commit() error {
obj.Logf("Worker(%s)", v)
// contains the Watch and CheckApply loops
err := obj.Worker(v)
obj.Logf("Worker(%s): Exited(%+v)", v, err)
obj.Logf("Worker(%s): Exited(%s)", v, engineUtil.CleanError(err))
obj.state[v].workerErr = err // store the error
// If the Rewatch metaparam is true, then this will get
// restarted if we do a graph cmp swap. This is why the