- // the last one does nothing if all of level bits are not set
- // in wxLog::GetActive()->GetTraceMask() - it's deprecated in favour of
- // string identifiers
- DECLARE_LOG_FUNCTION2(Trace, wxTraceMask mask);
-#else //!debug
- // these functions do nothing in release builds
- inline void wxLogDebug(const char *, ...) { }
- inline void wxLogTrace(const char *, ...) { }
- inline void wxLogTrace(wxTraceMask, const char *, ...) { }
- inline void wxLogTrace(const char *, const char *, ...) { }
+#endif // wxUSE_LOG/!wxUSE_LOG
+
+#define DECLARE_LOG_FUNCTION2(level, argclass, arg) \
+ DECLARE_LOG_FUNCTION2_EXP(level, argclass, arg, WXDLLIMPEXP_BASE)
+
+// VC6 produces a warning if we a macro expanding to nothing to
+// DECLARE_LOG_FUNCTION2:
+#if defined(__VISUALC__) && __VISUALC__ < 1300
+ // "not enough actual parameters for macro 'DECLARE_LOG_FUNCTION2_EXP'"
+ #pragma warning(disable:4003)
+#endif
+
+// a generic function for all levels (level is passes as parameter)
+DECLARE_LOG_FUNCTION2(Generic, wxLogLevel, level);
+
+// one function per each level
+DECLARE_LOG_FUNCTION(FatalError);
+DECLARE_LOG_FUNCTION(Error);
+DECLARE_LOG_FUNCTION(Warning);
+DECLARE_LOG_FUNCTION(Message);
+DECLARE_LOG_FUNCTION(Info);
+DECLARE_LOG_FUNCTION(Verbose);
+
+// this function sends the log message to the status line of the top level
+// application frame, if any
+DECLARE_LOG_FUNCTION(Status);
+
+#if wxUSE_GUI
+ // this one is the same as previous except that it allows to explicitly
+ class WXDLLIMPEXP_FWD_CORE wxFrame;
+ // specify the frame to which the output should go
+ DECLARE_LOG_FUNCTION2_EXP(Status, wxFrame *, pFrame, WXDLLIMPEXP_CORE);
+#endif // wxUSE_GUI
+
+// additional one: as wxLogError, but also logs last system call error code
+// and the corresponding error message if available
+DECLARE_LOG_FUNCTION(SysError);
+
+// and another one which also takes the error code (for those broken APIs
+// that don't set the errno (like registry APIs in Win32))
+DECLARE_LOG_FUNCTION2(SysError, long, lErrCode);
+#ifdef __WATCOMC__
+// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
+DECLARE_LOG_FUNCTION2(SysError, unsigned long, lErrCode);
+#endif
+
+// debug functions do nothing in release mode
+#if wxUSE_LOG && wxUSE_LOG_DEBUG
+ DECLARE_LOG_FUNCTION(Debug);
+
+ // there is no more unconditional LogTrace: it is not different from
+ // LogDebug and it creates overload ambiguities
+ //DECLARE_LOG_FUNCTION(Trace);
+
+ // this version only logs the message if the mask had been added to the
+ // list of masks with AddTraceMask()
+ DECLARE_LOG_FUNCTION2(Trace, const wxString&, mask);
+#ifdef __WATCOMC__
+ // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
+ DECLARE_LOG_FUNCTION2(Trace, const char*, mask);
+ DECLARE_LOG_FUNCTION2(Trace, const wchar_t*, mask);