mirror of https://github.com/hashicorp/packer
The logOutput function had a bunch of nested checks in the code for the function, as well as one ineffasign pointed out by golangci-lint. This commit changes how special cases are processed, and changes a bit how log redirection to a file is handled. Prior to this commit, only when PACKER_LOG and PACKER_LOG_FILE are set does Packer redirect logs to the specified path, which is a bit superfluous as setting PACKER_LOG_FILE should be enough on its own to redirect logs and enable verbose logs. Now, when neither is set, no logOutput is set, if PACKER_LOG_FILE is set (regardless of PACKER_LOG), we redirect to the specified file, and finally if PACKER_LOG is set, we redirect to stderr.pull/13110/head
parent
4436346fcb
commit
50850ef91b
Loading…
Reference in new issue