Hey list!
So, I'm using Packer as a library for a little Go project and I'm having trouble with controlling the output of the builds as I can't disable the debug messages.
What I did so far was:
- Created a Core Config
- Created a Packer Core based on the Core Config by calling packer.NewCore(config)
- Created a Build by calling Packer Core's .Build() function
- Called SetDebug(false) on the build generated on the step above
- Called Prepare() and then Run()
- It doesn't matter which type of UI I pass to Run() the debug messages are still shown.
The build process works just fine and an image is created in my GCP account. But I keep seeing multiple debug messages even after calling SetDebug() before calling Prepare(), as instructed by the comments in Packer's source code. For example:
2019/08/08 14:50:01 [DEBUG] Opening new ssh session
2019/08/08 14:50:01 [DEBUG] Starting remote scp process: scp -vt /tmp
2019/08/08 14:50:01 [DEBUG] Started SCP session, beginning transfers...
2019/08/08 14:50:01 [DEBUG] Copying input data into temporary file so we can read the length
2019/08/08 14:50:01 [DEBUG] scp: Uploading script_7943.sh: perms=C0644 size=61
2019/08/08 14:50:01 [DEBUG] SCP session complete, closing stdin pipe.
Does anybody have any pointers? What am I missing here?