From ffe71aadfdcb4a9ea2ac4d8d320983d42ef3cad5 Mon Sep 17 00:00:00 2001 From: LYW <leeyeanwoo@diteam.co.kr> Date: 화, 14 9월 2021 15:19:39 +0900 Subject: [PATCH] 버그 수정 --- ReviewSystem/ReviewSystem/DisplayMessage.cpp | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ReviewSystem/ReviewSystem/DisplayMessage.cpp b/ReviewSystem/ReviewSystem/DisplayMessage.cpp index 1555229..ccacf49 100644 --- a/ReviewSystem/ReviewSystem/DisplayMessage.cpp +++ b/ReviewSystem/ReviewSystem/DisplayMessage.cpp @@ -78,13 +78,20 @@ { va_list list; TCHAR strText[2000] = {0}; + try + { + va_start(list, lpstrFormat); + _vstprintf_s(strText, lpstrFormat, list); + va_end(list); - va_start(list, lpstrFormat); - _vstprintf_s(strText, lpstrFormat, list); - va_end(list); + CString* pstrLog = new CString(strText); + PostThreadMessage(m_ThreadId, WM_DIPLAY_LOG, reinterpret_cast<WPARAM>(pstrLog), 0); + } + catch (...) + { + return; + } - CString* pstrLog = new CString(strText); - PostThreadMessage(m_ThreadId, WM_DIPLAY_LOG, reinterpret_cast<WPARAM>(pstrLog), 0); // WriteToFile(strText); // @@ -123,7 +130,8 @@ // �쑀�땲肄붾뱶 �뙆�씪�쓽 �떆�옉�� BOM(0xFEFF) �씠�뼱�빞 �븳�떎. TCHAR strCommand = 0xFEFF; CString strLog = _T(""); - strTimeStamp.Format(_T("[%02d:%02d:%02d]"), time.GetHour(), time.GetMinute(), time.GetSecond()); + //strTimeStamp.Format(_T("[%02d:%02d:%02d]"), time.GetHour(), time.GetMinute(), time.GetSecond()); + strTimeStamp.Format(_T("[%02d:%02d:%02d:%02d:%02d:%02d]"), time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond()); #ifdef UNICODE strLog.Format(_T("%c%s %s\r\n"), strCommand, strTimeStamp, strMessage); #else @@ -151,6 +159,7 @@ case WM_DIPLAY_LOG: g_pLog->ThreadDisplayMessage(*pstrLog); + delete pstrLog; break; default: -- Gitblit v1.9.3