-#if wxUSE_UNICODE_UTF8
- #define IMPLEMENT_LOG_DEBUG_FUNCTION_UTF8(level) \
- void wxDoLog##level##Utf8(const char *format, ...) \
- { \
- va_list argptr; \
- va_start(argptr, format); \
- wxVLog##level(format, argptr); \
- va_end(argptr); \
- }
-#else
- #define IMPLEMENT_LOG_DEBUG_FUNCTION_UTF8(level)
-#endif
-
-#define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \
- void wxVLog##level(const wxString& format, va_list argptr) \
- { \
- if ( wxLog::IsEnabled() ) { \
- wxLog::OnLog(wxLOG_##level, \
- wxString::FormatV(format, argptr), time(NULL)); \
- } \
- } \
- IMPLEMENT_LOG_DEBUG_FUNCTION_WCHAR(level) \
- IMPLEMENT_LOG_DEBUG_FUNCTION_UTF8(level)
-
-
- void wxVLogTrace(const wxString& mask, const wxString& format, va_list argptr)
- {
- if ( wxLog::IsEnabled() && wxLog::IsAllowedTraceMask(mask) ) {
- wxString msg;
- msg << wxS("(") << mask << wxS(") ") << wxString::FormatV(format, argptr);
-
- wxLog::OnLog(wxLOG_Trace, msg, time(NULL));
- }
- }
-
-#if !wxUSE_UTF8_LOCALE_ONLY
- void wxDoLogTraceWchar(const wxString& mask, const wxChar *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogTrace(mask, format, argptr);
- va_end(argptr);
- }
-#endif // !wxUSE_UTF8_LOCALE_ONLY
-
-#if wxUSE_UNICODE_UTF8
- void wxDoLogTraceUtf8(const wxString& mask, const char *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogTrace(mask, format, argptr);
- va_end(argptr);
- }
-#endif // wxUSE_UNICODE_UTF8
-
- void wxVLogTrace(wxTraceMask mask, const wxString& format, 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 ( wxLog::IsEnabled() && ((wxLog::GetTraceMask() & mask) == mask) ) {
- wxLog::OnLog(wxLOG_Trace, wxString::FormatV(format, argptr), time(NULL));