wxLogTrace doesn't give messages with two 'Trace' in the beginning

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2000-02-23 18:50:12 +00:00
parent cb105ad434
commit 0131687bb5

View File

@ -180,9 +180,9 @@ void wxLogVerbose(const wxChar *szFormat, ...)
wxChar *p = s_szBuf;
size_t len = WXSIZEOF(s_szBuf);
strncpy(s_szBuf, _T("Trace ("), len);
len -= 7; // strlen("Trace (")
p += 7;
strncpy(s_szBuf, _T("("), len);
len -= 2; // strlen("(")
p += 2;
strncat(p, mask, len);
size_t lenMask = wxStrlen(mask);
len -= lenMask;
@ -369,8 +369,13 @@ void wxLog::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
case wxLOG_Trace:
case wxLOG_Debug:
#ifdef __WXDEBUG__
DoLogString(szString, t);
#endif
{
wxString msg = level == wxLOG_Trace ? wxT("Trace: ")
: wxT("Debug: "),
msg << szString;
DoLogString(msg, t);
}
#endif // Debug
break;
}
}