Date time stamps in packer logs

Running latest packer 1.11.2 and still see this issue.

The logs that are generated in the pipeline for AWS for windows start with “amazon-ebs.windows:”

Can we get a packer pkr.hcl config file argument or default (heaven forbid) that instead of showing “amazon-ebs.windows:” it would show date/time stamps in ISO8601 formats?

Like: 2024-11-25T15:04:07Z - some msg

Giving me “amazon-ebs.windows:” on each has little value.

More flexibility would be to allow any ISO8601 format.

Hi @joe.bruns,

For context, the amazon-ebs.windows: prefix aims to let you know which component is responsible for outputting this log entry, this is useful especially if you have multiple builds running concurrently as you need to know to which build/component a particular log is linked.

That said, I understand that timestamping logs might be a good thing to add. I’m not sure this should be part of the build config, but this could conceivably be a runtime option, through environment variables for now.

I’d argue against enabling this by default, mostly to avoid breaking existing users’ workflows, especially if they grep their output.

Would you be OK opening an issue on Github for this? I can’t promise when we’ll get around to working on this, but this definitely deserves a discussion on how/if/when to add this to the loggers.

Thanks!

Sure, let me get that done.