-void wxLogVerbose(const wxChar *szFormat, ...)
-{
- va_list argptr;
- va_start(argptr, szFormat);
- wxVLogVerbose(szFormat, argptr);
- va_end(argptr);
-}
-
-// debug functions
-#ifdef __WXDEBUG__
-#define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \
- void wxVLog##level(const wxChar *szFormat, va_list argptr) \
- { \
- if ( IsLoggingEnabled() ) { \
- wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \
- \
- wxVsnprintf(s_szBuf, s_szBufSize, szFormat, argptr); \
- \
- wxLog::OnLog(wxLOG_##level, s_szBuf, time(NULL)); \
- } \
- } \
- void wxLog##level(const wxChar *szFormat, ...) \
- { \
- va_list argptr; \
- va_start(argptr, szFormat); \
- wxVLog##level(szFormat, argptr); \
- va_end(argptr); \
- }
-
- void wxVLogTrace(const wxChar *mask, const wxChar *szFormat, va_list argptr)
- {
- if ( IsLoggingEnabled() && wxLog::IsAllowedTraceMask(mask) ) {
- wxCRIT_SECT_LOCKER(locker, gs_csLogBuf);
-
- wxChar *p = s_szBuf;
- size_t len = s_szBufSize;
- wxStrncpy(s_szBuf, _T("("), len);
- len -= 1; // strlen("(")
- p += 1;
- wxStrncat(p, mask, len);
- size_t lenMask = wxStrlen(mask);
- len -= lenMask;
- p += lenMask;
-
- wxStrncat(p, _T(") "), len);
- len -= 2;
- p += 2;
-
- wxVsnprintf(p, len, szFormat, argptr);
-
- wxLog::OnLog(wxLOG_Trace, s_szBuf, time(NULL));
- }
- }
-
- void wxLogTrace(const wxChar *mask, const wxChar *szFormat, ...)
- {
- va_list argptr;
- va_start(argptr, szFormat);
- wxVLogTrace(mask, szFormat, argptr);
- va_end(argptr);
- }
-
- void wxVLogTrace(wxTraceMask mask, const wxChar *szFormat, va_list argptr)
- {
- // we check that all of mask bits are set in the current mask, so
- // that wxLogTrace(wxTraceRefCount | wxTraceOle) will only do something
- // if both bits are set.
- if ( IsLoggingEnabled() && ((wxLog::GetTraceMask() & mask) == mask) ) {
- wxCRIT_SECT_LOCKER(locker, gs_csLogBuf);
-
- wxVsnprintf(s_szBuf, s_szBufSize, szFormat, argptr);
-
- wxLog::OnLog(wxLOG_Trace, s_szBuf, time(NULL));
- }
- }
-
- void wxLogTrace(wxTraceMask mask, const wxChar *szFormat, ...)
- {
- va_list argptr;
- va_start(argptr, szFormat);
- wxVLogTrace(mask, szFormat, argptr);
- va_end(argptr);
- }
-
-#else // release
- #define IMPLEMENT_LOG_DEBUG_FUNCTION(level)
-#endif