8000 feat: Enable workspace debug logging by mtojek · Pull Request #6838 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: Enable workspace debug logging #6838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 30, 2023
Prev Previous commit
Next Next commit
fix
  • Loading branch information
mtojek committed Mar 29, 2023
commit 864d2b2a415b55472e8245d29046ed1c8e3e49c3
4 changes: 2 additions & 2 deletions provisioner/terraform/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func planVars(plan *proto.Provision_Plan) ([]string, error) {
return vars, nil
}

func provisionEnv(config *proto.Provision_Config, params []*proto.ParameterValue, richParams []*proto.RichParameterValue, gitAuth []*proto.GitAuthProvider, verbose bool) ([]string, error) {
func provisionEnv(config *proto.Provision_Config, params []*proto.ParameterValue, richParams []*proto.RichParameterValue, gitAuth []*proto.GitAuthProvider, verboseLoggingEnabled bool) ([]string, error) {
env := safeEnviron()
env = append(env,
"CODER_AGENT_URL="+config.Metadata.CoderUrl,
Expand Down Expand Up @@ -237,7 +237,7 @@ func provisionEnv(config *proto.Provision_Config, params []*proto.ParameterValue
env = append(env, provider.GitAuthAccessTokenEnvironmentVariable(gitAuth.Id)+"="+gitAuth.AccessToken)
}

if verbose {
if verboseLoggingEnabled {
// TF_LOG=JSON enables all kind of logging: trace-debug-info-warn-error.
// The idea behind using TF_LOG=JSON instead of TF_LOG=debug is ensuring the proper log format.
env = append(env, "TF_LOG=JSON")
Expand Down
0