How can I write the packer build log to the disk image that is being built?

20 views Asked by At

Locally I can do this:

$ export PACKER_LOG_PATH="packer_build.log"
$ export PACKER_LOG=1
$ packer build -debug blah.json

But I also want packer_build.log to be present on the disk image itself. It's important to have a build log on the disk itself to see how it was built.

Does packer write this log on to the disk somewhere? I have not been able to find any documentation.

It feels wrong (and would probably fail due to file lock) to try to have packer upload the local log its logging to during a build. Before I even try something like that I want to confirm there is not a native feature for this.

0

There are 0 answers