From: Vadim Zeitlin Date: Wed, 23 Feb 2000 18:50:12 +0000 (+0000) Subject: wxLogTrace doesn't give messages with two 'Trace' in the beginning X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0131687bb53c2d10fec2af13f74ccc458698053a 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 --- diff --git a/src/common/log.cpp b/src/common/log.cpp index 3f062d0dfc..e187622915 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -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; } }