core: demote early exit log from ERROR -> DEBUG

This commit is contained in:
Paul Hinze 2016-02-24 09:58:33 -06:00
parent 8472c7d59f
commit 6af79168db
1 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,11 @@ func EvalRaw(n EvalNode, ctx EvalContext) (interface{}, error) {
log.Printf("[DEBUG] %s: eval: %T", path, n)
output, err := n.Eval(ctx)
if err != nil {
log.Printf("[ERROR] %s: eval: %T, err: %s", path, n, err)
if _, ok := err.(EvalEarlyExitError); ok {
log.Printf("[DEBUG] %s: eval: %T, err: %s", path, n, err)
} else {
log.Printf("[ERROR] %s: eval: %T, err: %s", path, n, err)
}
}
return output, err