Skip to content

Commit

Permalink
fix: Tolerate non-JSON log lines from plugin (#243)
Browse files Browse the repository at this point in the history
Co-authored-by: Kemal Hadimli <disq@users.noreply.github.com>
  • Loading branch information
disq and disq authored Feb 15, 2024
1 parent 4004fec commit cc06909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion managedplugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func (c *Client) readLogLines(reader io.ReadCloser) {
}
var structuredLogLine map[string]any
if err := json.Unmarshal(line, &structuredLogLine); err != nil {
c.logger.Err(err).Str("line", string(line)).Msg("failed to unmarshal log line from plugin")
c.logger.Info().Str("level", "unknown").Msg(string(line))
} else {
c.jsonToLog(c.logger, structuredLogLine)
}
Expand Down

0 comments on commit cc06909

Please sign in to comment.