Fix debug logging

The change done in #3964 causes the if statement to check if debug logging should be enabled to always pass.
This commit is contained in:
Sander van Harmelen 2016-10-07 21:10:20 +02:00
parent 7323f07f3c
commit 1fbadb4de9
1 changed files with 1 additions and 1 deletions

2
log.go
View File

@ -13,7 +13,7 @@ const EnvLogFile = "PACKER_LOG_PATH" //Set to a file
// logOutput determines where we should send logs (if anywhere).
func logOutput() (logOutput io.Writer, err error) {
logOutput = nil
if os.Getenv(EnvLog) != "" || os.Getenv(EnvLog) != "0" {
if os.Getenv(EnvLog) != "" && os.Getenv(EnvLog) != "0" {
logOutput = os.Stderr
if logPath := os.Getenv(EnvLogFile); logPath != "" {