To capture a trace log in Packer, set the environment variable PACKER_LOG
to any value other than0
. Refer to the steps below for details in your specific operating system:
Unix/Linux & macOS
In your Linux/macOS terminal, run the following commands:
export PACKER_LOG="1"
packer build -color=false . 2>&1 | tee build.txt
Windows
In your PowerShell terminal, run the following commands:
$Env:PACKER_LOG="1"
packer build -color=false . 2>&1 | Tee-Object -FilePath build.txt