fix: Make `terraform init` JSON log timestamps include millisecond precision (#37818)

* fix: terraform init log timestamps include millisecond precision

* docs: add changelog entry
pull/37840/head^2
Steven Masley 6 months ago committed by GitHub
parent 808713f56f
commit 3df28c3101
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
kind: ENHANCEMENTS
body: terraform init log timestamps include millisecond precision
time: 2025-10-27T13:22:38.714891768-05:00
custom:
Issue: "37818"

@ -9,6 +9,7 @@ import (
"strings"
"time"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/terraform/internal/command/arguments"
"github.com/hashicorp/terraform/internal/tfdiags"
)
@ -97,7 +98,7 @@ func (v *InitJSON) Output(messageCode InitMessageCode, params ...any) {
return
}
current_timestamp := time.Now().UTC().Format(time.RFC3339)
current_timestamp := time.Now().UTC().Format(hclog.TimeFormat)
json_data := map[string]string{
"@level": "info",
"@message": preppedMessage,

Loading…
Cancel
Save