From 7bcefbb2646131c29a52810f1410cdd20c8db880 Mon Sep 17 00:00:00 2001 From: Ryan Ohnemus Date: Fri, 16 Feb 2024 17:54:56 -0600 Subject: [PATCH] out_stackdriver: print tag with api error message (#8459) Signed-off-by: ryanohnemus --- plugins/out_stackdriver/stackdriver.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/out_stackdriver/stackdriver.c b/plugins/out_stackdriver/stackdriver.c index 621de325561..503fc9e68bd 100644 --- a/plugins/out_stackdriver/stackdriver.c +++ b/plugins/out_stackdriver/stackdriver.c @@ -2942,15 +2942,18 @@ static void cb_stackdriver_flush(struct flb_event_chunk *event_chunk, #endif if (c->resp.status >= 400 && c->resp.status < 500) { ret_code = FLB_ERROR; - flb_plg_warn(ctx->ins, "error: %s", c->resp.payload); + flb_plg_warn(ctx->ins, "tag=%s error sending to Cloud Logging: %s", event_chunk->tag, + c->resp.payload); } else { if (c->resp.payload_size > 0) { /* we got an error */ - flb_plg_warn(ctx->ins, "error: %s", c->resp.payload); + flb_plg_warn(ctx->ins, "tag=%s error sending to Cloud Logging: %s", event_chunk->tag, + c->resp.payload); } else { - flb_plg_debug(ctx->ins, "response: %s", c->resp.payload); + flb_plg_debug(ctx->ins, "tag=%s response from Cloud Logging: %s", event_chunk->tag, + c->resp.payload); } ret_code = FLB_RETRY; }