From 5810261add27ca589d843ee431b42267bdcfd9a0 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 25 Mar 2020 15:39:51 -0400 Subject: [PATCH] don't log path in EvalRaw eval nodes no longer always have a context path --- terraform/eval.go | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/terraform/eval.go b/terraform/eval.go index 51e89d8b5..2a8909aee 100644 --- a/terraform/eval.go +++ b/terraform/eval.go @@ -45,28 +45,16 @@ func Eval(n EvalNode, ctx EvalContext) (interface{}, error) { // EvalRaw is like Eval except that it returns all errors, even if they // signal something normal such as EvalEarlyExitError. func EvalRaw(n EvalNode, ctx EvalContext) (interface{}, error) { - path := "unknown" - - // FIXME: restore the path here somehow or log this in another manner - // We cannot call Path here, since the context may not yet have the path - // set. - //if ctx != nil { - // path = ctx.Path().String() - //} - //if path == "" { - // path = "" - //} - - log.Printf("[TRACE] %s: eval: %T", path, n) + log.Printf("[TRACE] eval: %T", n) output, err := n.Eval(ctx) if err != nil { switch err.(type) { case EvalEarlyExitError: - log.Printf("[TRACE] %s: eval: %T, early exit err: %s", path, n, err) + log.Printf("[TRACE] eval: %T, early exit err: %s", n, err) case tfdiags.NonFatalError: - log.Printf("[WARN] %s: eval: %T, non-fatal err: %s", path, n, err) + log.Printf("[WARN] eval: %T, non-fatal err: %s", n, err) default: - log.Printf("[ERROR] %s: eval: %T, err: %s", path, n, err) + log.Printf("[ERROR] eval: %T, err: %s", n, err) } }