<commit_before>---
layout: "docs"
page_title: "Debugging"
sidebar_current: "docs-internals-debug"
description: |-
  Terraform has detailed logs which can be enabled by setting the TF_LOG environmental variable to any value. This will cause detailed logs to appear on stderr
---

# Debugging Terraform

Terraform has detailed logs which can be enabled by setting the TF_LOG environmental variable to any value. This will cause detailed logs to appear on stderr.
<commit_msg>Documentation of TF_LOG taking log levels.<commit_after>---
layout: "docs"
page_title: "Debugging"
sidebar_current: "docs-internals-debug"
description: |-
  Terraform has detailed logs which can be enabled by setting the TF_LOG environmental variable to any value. This will cause detailed logs to appear on stderr
---

# Debugging Terraform

Terraform has detailed logs which can be enabled by setting the `TF_LOG` environmental variable to any value. This will cause detailed logs to appear on stderr.

You can set `TF_LOG` to one of the log levels `TRACE`, `DEBUG`, `INFO`, `WARN` or `ERROR` to change the verbosity of the logs. `TRACE` is the most verbose and it is the default if `TF_LOG` is set to something other than a log level name.

{'fraction_non_alphanumeric': 0.06414473684210527, 'fraction_numerical': 0.0, 'mean_word_length': 4.608294930875576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6021174', 'n_tokens_mistral': 326, 'n_tokens_neox': 324, 'n_words': 174}