Difference between revisions of "Terraform debugging: TF LOG"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Setting <code>[[TF_LOG]]</code> will send log to <code>[[stderr]]</code>.
 
 
 
* https://www.terraform.io/internals/debugging
 
* https://www.terraform.io/internals/debugging
 +
To enable debugging set<code>[[TF_LOG]]</code> variable to any of these values  <code>TRACE, DEBUG, INFO, WARN</code> or <code>ERROR</code>
 +
It will send log to <code>[[stderr]]</code>.
 +
Examples:
 +
:<code>[[export]] TF_LOG=TRACE</code>
 +
:<code>[[export]] TF_LOG=DEBUG</code>
 +
:<code>[[export]] TF_LOG=INFO</code>
 +
:<code>[[export]] TF_LOG=WARN</code>
 +
:<code>[[export]] TF_LOG=ERROR</code>
  
Values: <code>TRACE, DEBUG, INFO, WARN</code> or <code>ERROR</code>
 
  
 
* <code>[[TF_LOG]]</code> required even when <code>[[TF_LOG_PATH]]</code> is set.
 
* <code>[[TF_LOG]]</code> required even when <code>[[TF_LOG_PATH]]</code> is set.
Line 11: Line 16:
 
* <code>[[TF_VAR_]]</code>
 
* <code>[[TF_VAR_]]</code>
 
* [[Terraform Associate cheatsheet]]
 
* [[Terraform Associate cheatsheet]]
 +
* <code>[[terraform debug]]</code>
  
 
== See also ==
 
== See also ==
* {{Terraform}}
+
* {{Terraform env vars}}
 +
* {{Terraform debugging}}
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Latest revision as of 08:29, 16 March 2023

To enable debugging setTF_LOG variable to any of these values TRACE, DEBUG, INFO, WARN or ERROR It will send log to stderr. Examples:

export TF_LOG=TRACE
export TF_LOG=DEBUG
export TF_LOG=INFO
export TF_LOG=WARN
export TF_LOG=ERROR


Related[edit]

See also[edit]

Advertising: