Skip to content

Commit 9062cea

Browse files
committed
Use new plugin log api
Signed-off-by: sirwio <[email protected]>
1 parent 59b6315 commit 9062cea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugins/out_es/es.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static int cb_es_init(struct flb_output_instance *ins,
513513

514514
ctx = flb_calloc(1, sizeof(struct flb_elasticsearch));
515515
if (!ctx) {
516-
flb_errno();
516+
flb_plg_error(ins, "cannot initialize plugin");
517517
return -1;
518518
}
519519
ctx->ins = ins;

plugins/out_es/es_conf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ int es_config_ha(const char *upstream_file,
277277
ctx->ha_mode = FLB_TRUE;
278278
ctx->ha = flb_upstream_ha_from_file(upstream_file, config);
279279
if (!ctx->ha) {
280-
flb_error("[out_es] cannot load Upstream file");
280+
flb_plg_error(ctx->ins, "cannot load Upstream file");
281281
return -1;
282282
}
283283

@@ -296,7 +296,7 @@ int es_config_ha(const char *upstream_file,
296296
ec = flb_calloc(1, sizeof(struct flb_elasticsearch_config));
297297
if (!ec) {
298298
flb_errno();
299-
flb_error("[out_es] failed config allocation");
299+
flb_plg_error(ctx->ins, "failed config allocation");
300300
continue;
301301
}
302302

0 commit comments

Comments
 (0)