Skip to content

Commit f7dfae3

Browse files
authored
Improve logging for HTTP request sending
Signed-off-by: Nicholas Nezis <[email protected]>
1 parent f8c0d4d commit f7dfae3

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
@@ -596,7 +596,9 @@ static int send_all_requests(struct flb_out_http *ctx,
596596
}
597597

598598
if (body_found && headers_found) {
599-
flb_plg_trace(ctx->ins, "sending record %zu", record_count++);
599+
flb_plg_trace(ctx->ins, "sending record %zu via %s",
600+
record_count++,
601+
ctx->http_method == FLB_HTTP_POST ? "POST" : "PUT");
600602
ret = http_request(ctx, body, body_size, event_chunk->tag,
601603
flb_sds_len(event_chunk->tag), headers);
602604
}
@@ -633,7 +635,7 @@ static void cb_http_flush(struct flb_event_chunk *event_chunk,
633635
ctx->body_key, ctx->headers_key, event_chunk);
634636
if (ret < 0) {
635637
flb_plg_error(ctx->ins,
636-
"failed to send requests body key \"%s\"", ctx->body_key);
638+
"failed to send requests using body key \"%s\"", ctx->body_key);
637639
}
638640
}
639641
else {

0 commit comments

Comments
 (0)