From a74a41dac59c7c3e8eee3e707ee04396b6e1529d Mon Sep 17 00:00:00 2001 From: "Thibault \"bui\" Koechlin" Date: Wed, 16 Mar 2022 09:40:00 +0100 Subject: [PATCH] fix #1357 (#1358) --- pkg/parser/runtime.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/parser/runtime.go b/pkg/parser/runtime.go index ecd056d8e..c98c45f67 100644 --- a/pkg/parser/runtime.go +++ b/pkg/parser/runtime.go @@ -269,7 +269,7 @@ func Parse(ctx UnixParserCtx, xp types.Event, nodes []Node) (types.Event, error) StageParseCache[stage] = make(map[string][]ParserResult) } } - /* if the node is forward in stages, seek to its stage */ + /* if the node is forward in stages, seek to this stage */ /* this is for example used by testing system to inject logs in post-syslog-parsing phase*/ if stageidx(event.Stage, ctx.Stages) > stageidx(stage, ctx.Stages) { log.Tracef("skipping stage, we are already at [%s] expecting [%s]", event.Stage, stage) @@ -280,7 +280,8 @@ func Parse(ctx UnixParserCtx, xp types.Event, nodes []Node) (types.Event, error) /* if the stage is wrong, it means that the log didn't manage "pass" a stage with a onsuccess: next_stage tag */ if event.Stage != stage { log.Debugf("Event not parsed, expected stage '%s' got '%s', abort", stage, event.Stage) - return types.Event{Process: false}, nil + event.Process = false + return event, nil } isStageOK := false