.\" generated by cd2nroff 0.1 from CURLOPT_STDERR.md .TH CURLOPT_STDERR 3 "2024-08-02" libcurl .SH NAME CURLOPT_STDERR \- redirect stderr to another stream .SH SYNOPSIS .nf #include CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream); .fi .SH DESCRIPTION Pass a FILE * as parameter. Tell libcurl to use this \fIstream\fP instead of stderr when showing the progress meter and displaying \fICURLOPT_VERBOSE(3)\fP data. If you are using libcurl as a Windows DLL, this option causes an exception and a crash in the library since it cannot access a FILE * passed on from the application. A work\-around is to instead use \fICURLOPT_DEBUGFUNCTION(3)\fP. .SH DEFAULT stderr .SH PROTOCOLS This functionality affects all supported protocols .SH EXAMPLE .nf int main(void) { CURL *curl = curl_easy_init(); FILE *filep = fopen("dump", "wb"); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); curl_easy_setopt(curl, CURLOPT_STDERR, filep); curl_easy_perform(curl); } } .fi .SH AVAILABILITY Added in curl 7.1 .SH RETURN VALUE Returns CURLE_OK .SH SEE ALSO .BR CURLOPT_DEBUGFUNCTION (3), .BR CURLOPT_NOPROGRESS (3), .BR CURLOPT_VERBOSE (3)