From f7f72fb6ae9f5ff9898e58ed0c6e779be4ad8eee Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Thu, 21 Mar 2024 21:31:14 -0300 Subject: [PATCH] out_exit: change default to emulate legacy behaviour. Signed-off-by: Phillip Whelan --- plugins/out_exit/exit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/out_exit/exit.c b/plugins/out_exit/exit.c index 550b4b540e7..60279251852 100644 --- a/plugins/out_exit/exit.c +++ b/plugins/out_exit/exit.c @@ -67,9 +67,8 @@ static int cb_exit_init(struct flb_output_instance *ins, struct flb_config *conf if (ctx->flush_count == -1 && ctx->record_count == -1 && ctx->time_count == -1) { - flb_plg_error(ctx->ins, "no count set for flush, record or time, set at least one"); - flb_free(ctx); - return -1; + // emulate legacy behaviour by setting to a single flush. + ctx->flush_count = 1; } flb_output_set_context(ins, ctx);