Skip to content

Commit

Permalink
默认不写入网络连接失败的错误日志
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongyang219 committed May 22, 2021
1 parent 8f20bb7 commit 2699531
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions TrafficMonitor/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(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<size_t>(e->m_dwError) });
CCommon::WriteLog(info, theApp.m_log_path.c_str());
}
if (pfile != nullptr)
{
pfile->Close();
Expand Down

0 comments on commit 2699531

Please sign in to comment.