diff options
author | Aleksandar Jelenak <ajelenak@hdfgroup.org> | 2023-07-05 12:47:53 (GMT) |
---|---|---|
committer | Aleksandar Jelenak <ajelenak@hdfgroup.org> | 2023-07-05 12:47:53 (GMT) |
commit | 3348734ec9c91b438337633bb11aa8b871c4fbec (patch) | |
tree | 46a630d6009358ce2d0af215d9b22e71440eaad4 /src | |
parent | e6a845de20f34bd3bce0de7d1b581b73d91c560c (diff) | |
download | hdf5-3348734ec9c91b438337633bb11aa8b871c4fbec.zip hdf5-3348734ec9c91b438337633bb11aa8b871c4fbec.tar.gz hdf5-3348734ec9c91b438337633bb11aa8b871c4fbec.tar.bz2 |
Several ros3vfd logging improvements
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDs3comms.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 56d7d74..c9418ad 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -911,7 +911,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata") #if S3COMMS_DEBUG else - fprintf(stderr, "GETSIZE: OK\n"); + fprintf(stdout, "GETSIZE: OK\n"); #endif /****************** @@ -943,6 +943,10 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) handle->filesize = (size_t)content_length; +#if S3COMMS_DEBUG + fprintf(stdout, "FILESIZE: %zu\n", handle->filesize); +#endif + /********************** * UNDO HEAD SETTINGS * **********************/ @@ -1253,8 +1257,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) } #if S3COMMS_DEBUG - fprintf(stderr, "%s: Bytes %" PRIuHADDR " - %" PRIuHADDR ", Request Size: %zu\n", handle->httpverb, - offset, offset + len, len); + fprintf(stdout, "%s: Bytes %" PRIuHADDR " - %" PRIuHADDR ", Request Size: %zu\n", handle->httpverb, + offset, offset + len - 1, len); #endif /******************* @@ -1436,8 +1440,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) if (p_status != CURLE_OK) { if (CURLE_OK != curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code") - fprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode); - fprintf(stderr, "%s\n", curl_easy_strerror(p_status)); + fprintf(stdout, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode); + fprintf(stdout, "%s\n", curl_easy_strerror(p_status)); HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "problem while performing request."); } if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL)) @@ -1452,19 +1456,19 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) #if S3COMMS_DEBUG if (dest != NULL) { - fprintf(stderr, "len: %d\n", (int)len); - fprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n"); + fprintf(stdout, "len: %d\n", (int)len); + fprintf(stdout, "CHECKING FOR BUFFER OVERFLOW\n"); if (sds == NULL) - fprintf(stderr, "sds is NULL!\n"); + fprintf(stdout, "sds is NULL!\n"); else { - fprintf(stderr, "sds: 0x%lx\n", (long long)sds); - fprintf(stderr, "sds->size: %d\n", (int)sds->size); + fprintf(stdout, "sds: 0x%llx\n", (long long)sds); + fprintf(stdout, "sds->size: %d\n", (int)sds->size); if (len > sds->size) - fprintf(stderr, "buffer overwrite\n"); + fprintf(stdout, "buffer overwrite\n"); } } else - fprintf(stderr, "performed on entire file\n"); + fprintf(stdout, "performed on entire file\n"); #endif done: |