Skip to content

Commit a398968

Browse files
multiline: ml: ensure context is registered for REGEX type
This fix ensures that when the buffer is flushed, the record will have proper timestamp and metadata instead of just the "log" field. Signed-off-by: Mirko Lazarevic <[email protected]>
1 parent 10ebd3a commit a398968

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/multiline/flb_ml.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ static int package_content(struct flb_ml_stream *mst,
268268
if (ret == FLB_MULTILINE_TRUNCATED) {
269269
truncated = FLB_TRUE;
270270
}
271+
272+
if (stream_group->mp_sbuf.size == 0) {
273+
flb_ml_register_context(stream_group, tm, full_map);
274+
}
275+
271276
processed = FLB_TRUE;
272277
}
273278
else if (type == FLB_ML_ENDSWITH) {

0 commit comments

Comments
 (0)