nerdexam
HashiCorp

TA-002-P · Question #129

If you enable TF_LOG = DEBUG, the log will be stored in syslog.log file in the currect directory.

The correct answer is A. False. Enabling TF_LOG = DEBUG outputs verbose logging to standard error by default, not to a syslog.log file.

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

Question

If you enable TF_LOG = DEBUG, the log will be stored in syslog.log file in the currect directory.

Options

  • AFalse
  • BTrue

How the community answered

(48 responses)
  • A
    92% (44)
  • B
    8% (4)

Why each option

Enabling `TF_LOG = DEBUG` outputs verbose logging to standard error by default, not to a `syslog.log` file.

AFalseCorrect

Setting `TF_LOG = DEBUG` directs detailed debug logs to standard error (stderr). To save these logs to a file, the `TF_LOG_PATH` environment variable must be explicitly set to the desired file path, otherwise, no file is created by default.

BTrue

This is false; `TF_LOG` alone only directs output to stderr, and it does not automatically create or write to a file named `syslog.log`.

Concept tested: Terraform logging configuration

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

Topics

#TF_LOG#Logging#Debugging#CLI

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice