mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-04 10:42:04 +00:00
Add log_level option to filter output logs
This commit is contained in:
10 files changed
+244
-79
No files matched your search
+2
-1
@@ -17,6 +17,7 @@
|
||||
#endif // _WIN32
|
||||
|
||||
extern bool print_debug_info;
|
||||
extern int global_log_level;
|
||||
|
||||
typedef std::lock_guard<std::mutex> guarded_mutex;
|
||||
std::mutex cache_rw_lock;
|
||||
@@ -47,7 +48,7 @@ static int writer(char *data, size_t size, size_t nmemb, std::string *writerData
|
||||
static inline void curl_set_common_options(CURL *curl_handle, const char *url)
|
||||
{
|
||||
curl_easy_setopt(curl_handle, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, print_debug_info ? 1L : 0L);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, global_log_level == LOG_LEVEL_VERBOSE ? 1L : 0L);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1L);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
|
||||
Reference in new issue
Block a user