New libcwd channel 'curlio'.

Enable printing of libcurl 'IO' debug messages when libcwd channel
'curlio' is turned on (added to .libcwdrc). Avoiding a recompile.
This commit is contained in:
Aleric Inglewood
2012-07-05 03:10:16 +02:00
parent b8fc1f634e
commit df20f918ba
3 changed files with 4 additions and 4 deletions

View File

@@ -838,7 +838,7 @@ static int curl_debug_callback(CURL*, curl_infotype infotype, char* buf, size_t
marker << (void*)request->get_lockobj();
libcw_do.push_marker();
libcw_do.marker().assign(marker.str().data(), marker.str().size());
LibcwDoutScopeBegin(LIBCWD_DEBUGCHANNELS, libcw_do, dc::curl|cond_nonewline_cf(infotype == CURLINFO_TEXT))
LibcwDoutScopeBegin(LIBCWD_DEBUGCHANNELS, libcw_do, dc::curlio|cond_nonewline_cf(infotype == CURLINFO_TEXT))
switch (infotype)
{
case CURLINFO_TEXT:
@@ -930,17 +930,15 @@ void CurlEasyRequest::applyDefaultOptions(void)
//setopt(CURLOPT_DNS_CACHE_TIMEOUT, 0);
// Set the CURL options for either SOCKS or HTTP proxy.
applyProxySettings();
#if 0
// Cause libcurl to print all it's I/O traffic on the debug channel.
Debug(
if (dc::curl.is_on())
if (dc::curlio.is_on())
{
setopt(CURLOPT_VERBOSE, 1);
setopt(CURLOPT_DEBUGFUNCTION, &curl_debug_callback);
setopt(CURLOPT_DEBUGDATA, this);
}
);
#endif
}
void CurlEasyRequest::finalizeRequest(std::string const& url)