Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
chusitoo committed Nov 6, 2024
1 parent 5dc28ab commit e58cafd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/src/http/client/curl/http_operation_curl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -598,13 +598,17 @@ int HttpOperation::CurlLoggerCallback(const CURL * /* handle */,
{
OTEL_INTERNAL_LOG_ERROR(text_to_log);
}
// This guard serves as a catch-all block for all other less interesting output that should
// remain available for maintainer internal use and for debugging purposes only.
#ifdef CURL_DEBUG
else
{
OTEL_INTERNAL_LOG_DEBUG(text_to_log);
}
#endif // CURL_DEBUG
}
// Same as above, this guard meant only for internal use by maintainers, and should not be used in
// production (information leak)
#ifdef CURL_DEBUG
else if (type == CURLINFO_HEADER_OUT)
{
Expand Down Expand Up @@ -658,7 +662,7 @@ CURLcode HttpOperation::Setup()
return rc;
}
#else
rc = SetCurlLongOption(CURLOPT_VERBOSE, static_cast<long>(is_log_enabled_ || kEnableCurlLogging));
rc = SetCurlLongOption(CURLOPT_VERBOSE, (is_log_enabled_ && kEnableCurlLogging) ? 1L : 0L;
if (rc != CURLE_OK)
{
return rc;
Expand Down

0 comments on commit e58cafd

Please sign in to comment.