MCPcopy
hub / github.com/cloudflare/cloudflared / printJSON

Function printJSON

cmd/cloudflared/tail/cmd.go:253–260  ·  view source on GitHub ↗
(log *management.Log, logger *zerolog.Logger)

Source from the content-addressed store, hash-verified

251}
252
253func printJSON(log *management.Log, logger *zerolog.Logger) {
254 output, err := json.Marshal(log)
255 if err != nil {
256 logger.Debug().Msgf("unable to parse event to json %+v", log)
257 } else {
258 fmt.Println(string(output))
259 }
260}
261
262// Run implements a foreground runner
263func Run(c *cli.Context) error {

Callers 1

RunFunction · 0.85

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected