|
@@ -105,7 +105,26 @@ void LogTrace(LPCTSTR szFile, long lLine, LPCTSTR lpTraceLog, ...)
|
|
|
|
|
|
//g_LpLogFile->TraceProgress(szFileName, lLine, (LPCSTR)strLog.c_str());
|
|
|
}
|
|
|
+void LogWarn(LPCTSTR szFile, long lLine, LPCTSTR lpTraceLog, ...)
|
|
|
+{
|
|
|
+
|
|
|
+ std::string strLog;
|
|
|
+ va_list arglist;
|
|
|
+ va_start(arglist, lpTraceLog);
|
|
|
+ strLog = getFormattedStr(lpTraceLog, arglist);
|
|
|
+ va_end(arglist);
|
|
|
|
|
|
+
|
|
|
+ LPCTSTR szFileName = ::PathFindFileName(szFile);
|
|
|
+
|
|
|
+
|
|
|
+ CString str;
|
|
|
+ str.Format("%s(%ld) ", szFileName, lLine);
|
|
|
+ str.Append((LPCTSTR)strLog.c_str());
|
|
|
+ SendLogMessageToNlog(str, (int)PostLogLevel::warn);
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
void LogInfoTrace(LPCTSTR szFile, long lLine, LPCTSTR lpTraceLog, ...)
|
|
|
{
|
|
|
#ifdef LOGINFO_SWITCH
|