hashicorp / hashicorp/terraform-exec

Unable to set log level without writing to file

Open
#436 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
786
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Hey there legends! 👋

I'm trying to set `TF_LOG` using `tf.SetLog("TRACE")` and I am not getting any `TRACE` logging unless I also set the `TF_LOG_PATH`. Looking closer at the code, it looks like this is expected behavior? https://github.com/hashicorp/terraform-exec/blob/main/tfexec/cmd.go#L154-L166

Is there a way I can get TRACE logging without having to set the log path as well?

Cheers,
Nick

Contributor guide

Open the contributing guide

Research direction

Start in tfexec/cmd.go at lines 154-166 and trace how tf.SetLog("TRACE") is translated into Terraform environment settings. Confirm the current behavior without TF_LOG_PATH, then verify that TRACE logging is available when only the log level is configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, terraform
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.