Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: verbose Log from libcurl to a file
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Dan Fandrich via curl-library <curl-library_at_lists.haxx.se>
Date: Fri, 30 Dec 2022 10:28:56 -0800
On Fri, Dec 30, 2022 at 05:24:46PM +0000, Samantray Bhuyan, Madhusudan (GE Digital) via curl-library wrote:
> How to I redirect libcurl verbose output to a log file . I found https://
> stackoverflow.com/questions/38720602/
> getting-verbose-information-from-libcurl-to-a-file but the log file is empty
> for me.
>
> Using curl 7.79.1 on windows
Are you compiling libcurl yourself or are you using a pre-built DLL? As I
recall, Windows has a problem when using stdio when two different CRTs are
involved, one for libcurl and one for your application. The two versions may
have incompatible structures, so creating a FILE* in your application with one
CRT and passing it to libcurl that uses it with another might not work.
If you don't want to compile your own libcurl, then you'll probably have to
install your own CURLOPT_DEBUGFUNCTION so you have complete control over which
functions are used to write to the log file.
Dan
Date: Fri, 30 Dec 2022 10:28:56 -0800
On Fri, Dec 30, 2022 at 05:24:46PM +0000, Samantray Bhuyan, Madhusudan (GE Digital) via curl-library wrote:
> How to I redirect libcurl verbose output to a log file . I found https://
> stackoverflow.com/questions/38720602/
> getting-verbose-information-from-libcurl-to-a-file but the log file is empty
> for me.
>
> Using curl 7.79.1 on windows
Are you compiling libcurl yourself or are you using a pre-built DLL? As I
recall, Windows has a problem when using stdio when two different CRTs are
involved, one for libcurl and one for your application. The two versions may
have incompatible structures, so creating a FILE* in your application with one
CRT and passing it to libcurl that uses it with another might not work.
If you don't want to compile your own libcurl, then you'll probably have to
install your own CURLOPT_DEBUGFUNCTION so you have complete control over which
functions are used to write to the log file.
Dan
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2022-12-30