From 9062ceac8be736e6103bdce3ee9dc50d7285ab97 Mon Sep 17 00:00:00 2001 From: sirwio Date: Thu, 29 Oct 2020 14:06:38 +0100 Subject: [PATCH] Use new plugin log api Signed-off-by: sirwio --- plugins/out_es/es.c | 2 +- plugins/out_es/es_conf.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/out_es/es.c b/plugins/out_es/es.c index 04f59eba4b2..f8be71a6fd7 100644 --- a/plugins/out_es/es.c +++ b/plugins/out_es/es.c @@ -513,7 +513,7 @@ static int cb_es_init(struct flb_output_instance *ins, ctx = flb_calloc(1, sizeof(struct flb_elasticsearch)); if (!ctx) { - flb_errno(); + flb_plg_error(ins, "cannot initialize plugin"); return -1; } ctx->ins = ins; diff --git a/plugins/out_es/es_conf.c b/plugins/out_es/es_conf.c index 7b29f235765..c9d3e34ffa0 100644 --- a/plugins/out_es/es_conf.c +++ b/plugins/out_es/es_conf.c @@ -277,7 +277,7 @@ int es_config_ha(const char *upstream_file, ctx->ha_mode = FLB_TRUE; ctx->ha = flb_upstream_ha_from_file(upstream_file, config); if (!ctx->ha) { - flb_error("[out_es] cannot load Upstream file"); + flb_plg_error(ctx->ins, "cannot load Upstream file"); return -1; } @@ -296,7 +296,7 @@ int es_config_ha(const char *upstream_file, ec = flb_calloc(1, sizeof(struct flb_elasticsearch_config)); if (!ec) { flb_errno(); - flb_error("[out_es] failed config allocation"); + flb_plg_error(ctx->ins, "failed config allocation"); continue; }