nerdexam
HashiCorp

TA-002-P · Question #50

Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.

The correct answer is A. True. Setting the TF_LOG environment variable directs Terraform's detailed logging output, which can be captured by system logging facilities like syslog depending on the execution environment.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.

Options

  • ATrue
  • BFalse

How the community answered

(31 responses)
  • A
    90% (28)
  • B
    10% (3)

Why each option

Setting the `TF_LOG` environment variable directs Terraform's detailed logging output, which can be captured by system logging facilities like syslog depending on the execution environment.

ATrueCorrect

When `TF_LOG` is set to `DEBUG`, Terraform emits detailed logs to `stderr` by default; in many server environments or when run as a service, `stderr` is configured to be redirected and captured by `syslog`.

BFalse

Terraform's log output often ends up in `syslog` or other system log managers indirectly via `stderr` redirection, making the statement 'False' generally incorrect in common deployment scenarios.

Concept tested: Terraform logging configuration

Source: https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_log

Topics

#TF_LOG#Debugging#Environment Variables#Logging

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice