File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 44package views
55
66import (
7- "encoding/json"
87 "fmt"
98 "strings"
10- "time"
119
1210 "github.com/hashicorp/terraform/internal/command/arguments"
1311 "github.com/hashicorp/terraform/internal/tfdiags"
@@ -97,18 +95,11 @@ func (v *InitJSON) Output(messageCode InitMessageCode, params ...any) {
9795 return
9896 }
9997
100- current_timestamp := time .Now ().UTC ().Format (time .RFC3339 )
101- json_data := map [string ]string {
102- "@level" : "info" ,
103- "@message" : preppedMessage ,
104- "@module" : "terraform.ui" ,
105- "@timestamp" : current_timestamp ,
106- "type" : "init_output" ,
107- "message_code" : string (messageCode ),
108- }
109-
110- init_output , _ := json .Marshal (json_data )
111- v .view .view .streams .Println (string (init_output ))
98+ v .view .log .Info (
99+ preppedMessage ,
100+ "type" , "init_output" , // Add "type":"init_output"
101+ "message_code" , string (messageCode ), // Add "message_code":"<value>"
102+ )
112103}
113104
114105func (v * InitJSON ) LogInitMessage (messageCode InitMessageCode , params ... any ) {
You can’t perform that action at this time.
0 commit comments