Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想捕捉在 Libcurl (C++) 中打印到 STDERR 的详细数据。但是,我只能在我想更改时指向一个文件CURLOPT_STDERR。当然,我可以指向一个文件,转储数据,读取文件并删除文件,但这似乎是一个糟糕的例程?
CURLOPT_STDERR
除此之外,我知道CURLOPT_DEBUGFUNCTION这会给我返回错误的格式化字符串,最后带有奇怪的换行符,我无法替换我的日志记录。
CURLOPT_DEBUGFUNCTION
那么,如何STDERR从CURLOPT_VERBOSE函数中捕获干净的数据(如 所示)?
STDERR
CURLOPT_VERBOSE