@section log_tracemasks Using trace masks
+ Notice that the use of log trace masks is hardly necessary any longer in
+ current wxWidgets version as the same effect can be achieved by using
+ different log components for different log statements of any level. Please
+ see @ref overview_log_enable for more information about the log components.
+
The functions below allow some limited customization of wxLog behaviour
without writing a new log target class (which, aside from being a matter of
several minutes, allows you to do anything you want).
/**
Globally enable or disable logging.
- Calling this function with @false argument disables all log messages.
+ Calling this function with @false argument disables all log messages
+ for the current thread.
@see wxLogNull, IsEnabled()
static bool IsEnabled();
/**
- Returns true if logging at this level is enabled.
+ Returns true if logging at this level is enabled for the current thread.
This function only returns @true if logging is globally enabled and if
@a level is less than or equal to the maximal log level enabled for the
/** @addtogroup group_funcmacro_log */
//@{
/**
+ Log a message at wxLOG_Trace log level.
+
+ Notice that the use of trace masks is not recommended any more as setting
+ the log components (please see @ref overview_log_enable) provides a way to
+ do the same thing for log messages of any level, and not just the tracing
+ ones.
+
Like wxLogDebug(), trace functions only do something in debug builds and
expand to nothing in the release one. The reason for making it a separate
function is that usually there are a lot of trace messages, so it might
void wxVLogSysError(const char* formatString, va_list argPtr);
//@}
+/** @addtogroup group_funcmacro_debug */
+//@{
+
+/**
+ @def wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD()
+
+ Use this macro to disable logging at debug and trace levels in release
+ build when not using IMPLEMENT_APP().
+
+ @see wxDISABLE_DEBUG_SUPPORT(),
+ wxDISABLE_ASSERTS_IN_RELEASE_BUILD(),
+ @ref overview_debugging
+
+ @since 2.9.1
+
+ @header{wx/log.h}
+ */
+#define wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD()
+
+//@}
+