From 9aa3a8ff940e89bb0b5c75bc8abd0864e4c85874 Mon Sep 17 00:00:00 2001
From: LYW <leeyeanwoo@diteam.co.kr>
Date: 화, 17 8월 2021 10:00:15 +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