#ifndef _WX_LOG_H_
#define _WX_LOG_H_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "log.h"
#endif
static void RemoveTraceMask(const wxString& str);
// remove all string trace masks
static void ClearTraceMasks();
+ // get string trace masks
+ static const wxArrayString &GetTraceMasks() { return ms_aTraceMasks; }
// sets the timestamp string: this is used as strftime() format string
// for the log targets which add time stamps to the messages - set it
#define DECLARE_LOG_FUNCTION(level) \
extern void WXDLLEXPORT wxVLog##level(const wxChar *szFormat, \
va_list argptr); \
-extern void WXDLLEXPORT wxLog##level(const wxChar *szFormat, ...)
+extern void WXDLLEXPORT wxLog##level(const wxChar *szFormat, \
+ ...) ATTRIBUTE_PRINTF_1
#define DECLARE_LOG_FUNCTION2(level, arg1) \
extern void WXDLLEXPORT wxVLog##level(arg1, const wxChar *szFormat, \
va_list argptr); \
-extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...)
+extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, \
+ ...) ATTRIBUTE_PRINTF_2
#else // !wxUSE_LOG
#ifdef __VISUALC__
#define wxLogApiError(api, rc) \
wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \
- __TFILE__, __LINE__, api, \
- rc, wxSysErrorMsg(rc))
+ __TFILE__, __LINE__, api, \
+ (long)rc, wxSysErrorMsg(rc))
#else // !VC++
#define wxLogApiError(api, rc) \
wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \
- "error 0x%08lx (%s)."), \
- __TFILE__, __LINE__, api, \
- rc, wxSysErrorMsg(rc))
+ "error 0x%08lx (%s)."), \
+ __TFILE__, __LINE__, api, \
+ (long)rc, wxSysErrorMsg(rc))
#endif // VC++/!VC++
#define wxLogLastError(api) wxLogApiError(api, wxSysErrorCode())
#endif // _WX_LOG_H_
+// vi:sts=4:sw=4:et