Skip to content

Commit ee572de

Browse files
authored
Fix TF_LOG \r hack for timezones other than UTC (#515)
1 parent 5d45379 commit ee572de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

iterative/utils/logger.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ func TpiLogger(d *schema.ResourceData) *logrus.Entry {
106106
}
107107

108108
func hideUnwantedPrefix(levelText, newPrefix, message string) string {
109-
unwantedPrefixLength := len(fmt.Sprintf("yyyy-mm-ddThh:mm:ss.mmmZ [%s] provider.terraform-provider-iterative: [%[1]s]", levelText))
109+
timeString := time.Now().Format("2006-01-02T15:04:05.000Z0700")
110+
unwantedPrefixLength := len(fmt.Sprintf("%s [%s] provider.terraform-provider-iterative: [%[2]s]", timeString, levelText))
110111

111112
var output string
112113
for _, line := range strings.Split(message, "\n") {

0 commit comments

Comments
 (0)