diff --git a/managedplugin/logging.go b/managedplugin/logging.go index cf692af..131a31d 100644 --- a/managedplugin/logging.go +++ b/managedplugin/logging.go @@ -4,7 +4,9 @@ import "github.com/rs/zerolog" func (c *Client) jsonToLog(l zerolog.Logger, msg map[string]any) { level := msg["level"] + // Delete fields already added by the CLI so that they don't appear twice in the logs when we stream it from plugins delete(msg, "level") + delete(msg, "invocation_id") switch level { case "trace": l.Trace().Fields(msg).Msg("")