From 5abdbe9bde8736230679f7f655f49341ed55815c Mon Sep 17 00:00:00 2001 From: Jeremy Bernard Date: Mon, 28 Jul 2025 10:20:14 +0200 Subject: [PATCH 1/2] fix: issues in several logging statements --- .../src/secret_provider_agent.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c b/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c index e70e641..a44e46f 100644 --- a/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c +++ b/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c @@ -28,25 +28,24 @@ int app_log_level = -1; do { \ if (app_log_level == 0) { \ TIMEPRINT \ - printf("[Debug]"); \ + printf("[DEBUG]"); \ printf("[%s:%d] ", __FILE__, __LINE__); \ printf(__VA_ARGS__); \ } \ } while (0); -#define LOG_WARING(...) \ +#define LOG_WARNING(...) \ do { \ TIMEPRINT \ - printf("[Waring]"); \ + printf("[WARNING]"); \ printf("[%s:%d] ", __FILE__, __LINE__); \ printf(__VA_ARGS__); \ - \ } while (0); #define LOG_ERROR(...) \ do { \ TIMEPRINT \ - printf("[Error]"); \ + printf("[ERROR]"); \ printf("[%s:%d] ", __FILE__, __LINE__); \ printf(__VA_ARGS__); \ } while (0); @@ -54,7 +53,7 @@ int app_log_level = -1; #define LOG_INFO(...) \ do { \ TIMEPRINT \ - printf("[Info]"); \ + printf("[INFO]"); \ printf("[%s:%d] ", __FILE__, __LINE__); \ printf(__VA_ARGS__); \ } while (0); @@ -205,10 +204,10 @@ int push_wrapkey_to_secret_box(const char* secret) { break; } default: { - LOG_WARING("the value of %s is not string, not support yet\n", key); + LOG_WARNING("the value of %s is not string, not support yet\n", key); } } - LOG_DEBUG("key is %s, value is %s\n", key, value) + LOG_DEBUG("key is %s, value is %s\n", key, value); iter = json_object_iter_next(json_secret, iter); @@ -228,7 +227,7 @@ int push_wrapkey_to_secret_box(const char* secret) { strcat(request_buffer, key); strcat(request_buffer, "&value="); strcat(request_buffer, value); - LOG_DEBUG("request body is %s\n", request_buffer) + LOG_DEBUG("request body is %s\n", request_buffer); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request_buffer); res = curl_easy_perform(curl); From b5abd7608b9675d70ddc3102e165f5303f06adbf Mon Sep 17 00:00:00 2001 From: Jeremy Bernard Date: Mon, 28 Jul 2025 10:37:17 +0200 Subject: [PATCH 2/2] fix: misspelling in logging message --- .../secret-provider-agent/src/secret_provider_agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c b/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c index a44e46f..40c7000 100644 --- a/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c +++ b/cvmassistants/secretprovider/secret-provider-agent/src/secret_provider_agent.c @@ -238,7 +238,7 @@ int push_wrapkey_to_secret_box(const char* secret) { curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code); if (http_code != 200) { - LOG_ERROR("verify quteo from azure failed, http code is ;%ld\n", http_code); + LOG_ERROR("verify quote from azure failed, http code is ;%ld\n", http_code); return -1; } curl_easy_cleanup(curl);