Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
C++ algoliadatastoreelasticsearchenterprise-searchfacetingfull-text-searchfuzzy-searchgeosearchin-memoryinstantsearchmerchandisingpineconesearchsearch-enginesemantic-searchsimilarity-searchsite-searchsynonymstypo-tolerancevector-search
Log curl failure meta ahead of url to prevent truncation.
Kishore Nallanc6e67115a8f4
diff --git a/src/http_client.cpp b/src/http_client.cppindex 28fdf0c8..79a62a4a 100644--- a/src/http_client.cpp+++ b/src/http_client.cpp@@ -152,17 +152,21 @@ long HttpClient::perform_curl(CURL *curl, std::map<std::string, std::string>& reif (res != CURLE_OK) {char* url = nullptr;+ char *method = nullptr;+curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);+ curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_METHOD, &method);long status_code = 0;if(res == CURLE_OPERATION_TIMEDOUT) {double total_time;curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);- LOG(ERROR) << "CURL timeout. Time taken: " << total_time << ", URL: " << url;+ LOG(ERROR) << "CURL timeout. Time taken: " << total_time << ", method: " << method << ", url: " << url;status_code = 408;} else {- LOG(ERROR) << "CURL failed. URL: " << url << ", Code: " << res << ", strerror: " << curl_easy_strerror(res);+ LOG(ERROR) << "CURL failed. Code: " << res << ", strerror: " << curl_easy_strerror(res)+ << ", method: " << method << ", url: " << url;status_code = 500;}