Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,32 @@ 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);

#define LOG_INFO(...) \
do { \
TIMEPRINT \
printf("[Info]"); \
printf("[INFO]"); \
printf("[%s:%d] ", __FILE__, __LINE__); \
printf(__VA_ARGS__); \
} while (0);
Expand Down Expand Up @@ -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);

Expand All @@ -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);
Expand All @@ -239,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);
Expand Down