From 1143571f3d0490c0d3c30103a4a7f435a6ca67e2 Mon Sep 17 00:00:00 2001 From: Aleksandar Jelenak Date: Sat, 20 Jul 2024 21:10:55 -0400 Subject: [PATCH 1/2] Add minimal amount of S3 request logging to ROS3 --- src/H5FDs3comms.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 4b1ff0091aa..c7332163365 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -810,6 +810,11 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) handle->filesize = (size_t)content_length; +#if S3COMMS_CURL_VERBOSITY == 1 + fprintf(stdout, " -- size: %ju\n", content_length); + fflush(stdout); +#endif + /********************** * UNDO HEAD SETTINGS * **********************/ @@ -1119,6 +1124,12 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value"); } +#if S3COMMS_CURL_VERBOSITY == 1 + fprintf(stdout, "%s: Bytes %" PRIuHADDR " - %" PRIuHADDR ", Request Size: %zu\n", handle->httpverb, + offset, offset + len - 1, len); + fflush(stdout); +#endif + /******************* * COMPILE REQUEST * *******************/ From 373d87cfaf5e9f215dd4aa7fb0bd1c5c67108a02 Mon Sep 17 00:00:00 2001 From: Aleksandar Jelenak Date: Tue, 20 Aug 2024 17:35:25 -0400 Subject: [PATCH 2/2] Fix ROS3 logging ifdef conditions --- src/H5FDs3comms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index c7332163365..218980ece77 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -50,7 +50,7 @@ /* manipulate verbosity of CURL output * * 0 -> no explicit curl output - * 1 -> on error, print failure info to stderr + * 1 -> print: (1) failure info to stderr on error, (2) basic HTTP range GET info * 2 -> in addition to above, print information for all performs; sets all * curl handles with CURLOPT_VERBOSE */ @@ -810,7 +810,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) handle->filesize = (size_t)content_length; -#if S3COMMS_CURL_VERBOSITY == 1 +#if S3COMMS_CURL_VERBOSITY > 0 fprintf(stdout, " -- size: %ju\n", content_length); fflush(stdout); #endif @@ -1124,7 +1124,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value"); } -#if S3COMMS_CURL_VERBOSITY == 1 +#if S3COMMS_CURL_VERBOSITY > 0 fprintf(stdout, "%s: Bytes %" PRIuHADDR " - %" PRIuHADDR ", Request Size: %zu\n", handle->httpverb, offset, offset + len - 1, len); fflush(stdout);