Skip to content

Commit 2ca31a2

Browse files
committed
output: fix event_type initialization
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 22262db commit 2ca31a2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/flb_output.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,14 @@ struct flb_output_instance *flb_output_new(struct flb_config *config,
427427
flb_errno();
428428
return NULL;
429429
}
430-
instance->event_type = plugin->event_type;
430+
431+
/* Initialize event type, if not set, default to FLB_OUTPUT_LOGS */
432+
if (plugin->event_type == 0) {
433+
instance->event_type = FLB_OUTPUT_LOGS;
434+
}
435+
else {
436+
instance->event_type = plugin->event_type;
437+
}
431438
instance->config = config;
432439
instance->log_level = -1;
433440
instance->test_mode = FLB_FALSE;

0 commit comments

Comments
 (0)