Skip to content

Commit

Permalink
in_tail: if parser fails, pack raw text (fluent#499)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
  • Loading branch information
edsiper authored and zhaoyang.wang committed May 28, 2018
1 parent 41abd11 commit 4a5b425
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/in_tail/tail_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ static int process_content(struct flb_tail_file *file, off_t *bytes)
(char**) &out_buf, &out_size, file);
flb_free(out_buf);
}
else {
/* Parser failed, pack raw text */
flb_time_get(&out_time);
flb_tail_file_pack_line(out_sbuf, out_pck, &out_time,
data, len, file);
}
}
else if (ctx->multiline == FLB_TRUE) {
ret = flb_tail_mult_process_content(now,
Expand Down

0 comments on commit 4a5b425

Please sign in to comment.