Managing stderr and stdout
Remember that Packer builds sources in parallel by forking a new process for each one and waiting for them to finish. This means the output for each build dumps its output into the same stdout
stream at once. Unfortunately, as of this writing, there is no feature to specify one log file per process. Instead, each process output gets a random color by default. This is helpful for distinguishing build output with your eyes only if your display shows colored text. Also, note that redirecting output to a file or specifying an output file via the PACKER_LOG_FILE
environment variable will technically preserve color highlighting, but not all text editors or tools show or preserve shell color escape sequences. In all honesty, Packer’s default output is not ideal for automation, and it may be important to break output up by the process. For this, the -machine-readable
build flag is available. Specifying this flag prefixes every line in the shell output with...