Skip to content

Commit ca7479e

Browse files
committed
Improve logging for HTTP request sending
Signed-off-by: Nicholas Nezis <[email protected]>
1 parent 000baca commit ca7479e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/out_http/http.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,9 @@ static int send_all_requests(struct flb_out_http *ctx,
598598
}
599599

600600
if (body_found && headers_found) {
601-
flb_plg_trace(ctx->ins, "sending record %zu", record_count++);
601+
flb_plg_trace(ctx->ins, "sending record %zu via %s",
602+
record_count++,
603+
ctx->http_method == FLB_HTTP_POST ? "POST" : "PUT");
602604
ret = http_request(ctx, body, body_size, event_chunk->tag,
603605
flb_sds_len(event_chunk->tag), headers);
604606
}
@@ -635,7 +637,7 @@ static void cb_http_flush(struct flb_event_chunk *event_chunk,
635637
ctx->body_key, ctx->headers_key, event_chunk);
636638
if (ret < 0) {
637639
flb_plg_error(ctx->ins,
638-
"failed to send requests body key \"%s\"", ctx->body_key);
640+
"failed to send requests using body key \"%s\"", ctx->body_key);
639641
}
640642
}
641643
else {

0 commit comments

Comments
 (0)