Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_stackdriver: print tag with api error message #8459

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions plugins/out_stackdriver/stackdriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading