-#if wxUSE_LOG_DEBUG
- void wxVLogDebug(const wxString& format, va_list argptr)
- {
- if ( wxLog::IsEnabled() )
- {
- wxLog::OnLog(wxLOG_Debug, wxString::FormatV(format, argptr));
- }
- }
-
-#if !wxUSE_UTF8_LOCALE_ONLY
- void wxDoLogDebugWchar(const wxChar *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogDebug(format, argptr);
- va_end(argptr);
- }
-#endif // !wxUSE_UTF8_LOCALE_ONLY
-
-#if wxUSE_UNICODE_UTF8
- void wxDoLogDebugUtf8(const char *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogDebug(format, argptr);
- va_end(argptr);
- }
-#endif // wxUSE_UNICODE_UTF8
-#endif // wxUSE_LOG_DEBUG
-
-#if wxUSE_LOG_TRACE
- 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);
- }
- }
-
-#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
-
-// deprecated (but not declared as such because we don't want to complicate
-// DECLARE_LOG_FUNCTION macros even more) overloads for wxTraceMask
-#if WXWIN_COMPATIBILITY_2_8
- 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));
- }
- }
-
-#if !wxUSE_UTF8_LOCALE_ONLY
- void wxDoLogTraceWchar(wxTraceMask 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(wxTraceMask mask, const char *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogTrace(mask, format, argptr);
- va_end(argptr);
- }
-#endif // wxUSE_UNICODE_UTF8
-
-#endif // WXWIN_COMPATIBILITY_2_8
-
-#ifdef __WATCOMC__
-#if WXWIN_COMPATIBILITY_2_8
- // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
- void wxDoLogTraceWchar(int mask, const wxChar *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogTrace(mask, format, argptr);
- va_end(argptr);
- }
-#endif // WXWIN_COMPATIBILITY_2_8
-
- void wxDoLogTraceWchar(const char *mask, const wxChar *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogTrace(mask, format, argptr);
- va_end(argptr);
- }
-
- void wxDoLogTraceWchar(const wchar_t *mask, const wxChar *format, ...)
- {
- va_list argptr;
- va_start(argptr, format);
- wxVLogTrace(mask, format, argptr);
- va_end(argptr);
- }
-
-#if WXWIN_COMPATIBILITY_2_8
- void wxVLogTrace(int mask, const wxString& format, va_list argptr)
- { wxVLogTrace((wxTraceMask)mask, format, argptr); }
-#endif // WXWIN_COMPATIBILITY_2_8
- void wxVLogTrace(const char *mask, const wxString& format, va_list argptr)
- { wxVLogTrace(wxString(mask), format, argptr); }
- void wxVLogTrace(const wchar_t *mask, const wxString& format, va_list argptr)
- { wxVLogTrace(wxString(mask), format, argptr); }
-#endif // __WATCOMC__
-#endif // wxUSE_LOG_TRACE
-
-
-// wxLogSysError: one uses the last error code, for other you must give it
-// explicitly
-
-// return the system error message description
-static inline wxString wxLogSysErrorHelper(long err)