From ac504a97b2328bf8b3ce40e9b144e7e30efc612e Mon Sep 17 00:00:00 2001 From: xiaobaowen Date: Thu, 9 May 2024 14:14:28 +0800 Subject: [PATCH] out_s3: fix stale log for max total_file_size Signed-off-by: xiaobaowen --- plugins/out_s3/s3.c | 2 +- plugins/out_s3/s3.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index d6c58d6bbba..25a58d45bc0 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -700,7 +700,7 @@ static int cb_s3_init(struct flb_output_instance *ins, */ ctx->upload_chunk_size = ctx->file_size; if (ctx->file_size > MAX_FILE_SIZE_PUT_OBJECT) { - flb_plg_error(ctx->ins, "Max total_file_size is 50M when use_put_object is enabled"); + flb_plg_error(ctx->ins, "Max total_file_size is "MAX_FILE_SIZE_PUT_OBJECT_STR" when use_put_object is enabled"); return -1; } } diff --git a/plugins/out_s3/s3.h b/plugins/out_s3/s3.h index e51d39f2419..a964091249e 100644 --- a/plugins/out_s3/s3.h +++ b/plugins/out_s3/s3.h @@ -44,6 +44,7 @@ /* Allowed max file size 1 GB for publishing to S3 */ #define MAX_FILE_SIZE_PUT_OBJECT 1000000000 +#define MAX_FILE_SIZE_PUT_OBJECT_STR "1G" #define DEFAULT_UPLOAD_TIMEOUT 3600