From 1fbadb4de926e9a03fdbf706753096cb63ea9aad Mon Sep 17 00:00:00 2001 From: Sander van Harmelen Date: Fri, 7 Oct 2016 21:10:20 +0200 Subject: [PATCH] Fix debug logging The change done in #3964 causes the if statement to check if debug logging should be enabled to always pass. --- log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log.go b/log.go index 50ffbfac9..e22633e22 100644 --- a/log.go +++ b/log.go @@ -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 != "" {