fix: log raw JSON on parse errors for debugging
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled

- Add raw JSON payload to parse error warnings
- Helps diagnose malformed JSON from senders
- Version bumped to 1.1.4

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-03-02 23:20:51 +01:00
parent ac357c19ea
commit 6b690a3eb3
3 changed files with 7 additions and 4 deletions

View File

@ -152,8 +152,8 @@ func (s *UnixSocketSource) readDatagrams(ctx context.Context, eventChan chan<- *
event, err := parseJSONEvent(data, s.config.SourceType)
if err != nil {
// Log parse errors as warnings
s.logger.Warnf("parse error: %v", err)
// Log parse errors with the raw data for debugging
s.logger.Warnf("parse error: %v | raw: %s", err, string(data))
continue
}