diff --git a/TrafficMonitor/Common.cpp b/TrafficMonitor/Common.cpp index 20833440d..cf6ba8ce5 100644 --- a/TrafficMonitor/Common.cpp +++ b/TrafficMonitor/Common.cpp @@ -619,8 +619,11 @@ bool CCommon::GetURL(const wstring& url, wstring& result, bool utf8, const wstri catch (CInternetException* e) { //写入错误日志 - CString info = CCommon::LoadTextFormat(IDS_GET_URL_ERROR_LOG_INFO, { url, static_cast(e->m_dwError) }); - CCommon::WriteLog(info, theApp.m_log_path.c_str()); + if (theApp.m_debug_log) + { + CString info = CCommon::LoadTextFormat(IDS_GET_URL_ERROR_LOG_INFO, { url, static_cast(e->m_dwError) }); + CCommon::WriteLog(info, theApp.m_log_path.c_str()); + } if (pfile != nullptr) { pfile->Close();