in_stdin: add missing default timestamp
@@ -147,10 +147,16 @@ static int in_stdin_collect(struct flb_input_instance *i_ins,
return 0;
}
else {
+ /* Reset time for each line */
+ flb_time_zero(&out_time);
+
/* Use the defined parser */
ret = flb_parser_do(ctx->parser, ctx->buf, ctx->buf_len,
&out_buf, &out_size, &out_time);
if (ret >= 0) {
+ if (flb_time_to_double(&out_time) == 0) {
+ flb_time_get(&out_time);
+ }
pack_regex(ctx, &out_time, out_buf, out_size);
flb_free(out_buf);
}
