Skip to content

Commit a8f3804

Browse files
committed
Minor logging
1 parent e29a760 commit a8f3804

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

hcl_ast.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ func updateValuesInTfvarsFile(astf *ast.File, allKeyValues map[string]interface{
9292
typeName := reflect.TypeOf(n).String()
9393

9494
if typeName == "*ast.ObjectItem" {
95-
log.Traceln("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
96-
log.Traceln("Node type=", typeName)
95+
//log.Traceln("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
96+
//log.Traceln("Node type=", typeName)
9797

98-
log.Traceln("Node=")
99-
log.Traceln(spew.Sdump(n))
98+
//log.Traceln("Node=")
99+
//log.Traceln(spew.Sdump(n))
100100

101101
leadCommentText := ""
102102
lineCommentText := ""

main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ func main() {
145145
resultValue, resultType, errResult := getResultFromTerragruntOutput(workDir, outputName)
146146

147147
if errResult != nil {
148-
log.Warnf("Can't update value of %s in %s because key \"%s\" does not exist in output", key, tfvarsFullpath, outputName)
148+
log.Warnf("Can't update value of %s in %s because key \"%s\"", key, tfvarsFullpath, outputName)
149+
log.Warnf("Error from terragrunt:", errResult)
149150
log.Println()
150151
}
151152

@@ -242,6 +243,8 @@ func getResultFromTerragruntOutput(dirName string, outputName string) (interface
242243
lsOut, err := lsCmd.Output()
243244

244245
if err != nil {
246+
log.Debugln(spew.Sdump(lsCmd))
247+
245248
return "", "", errors.Wrapf(err, "running terragrunt output -json %s", outputName)
246249
}
247250

0 commit comments

Comments
 (0)