See @ref overview_wxlogoverview "log overview" for the descriptions of wxWidgets
logging facilities.
- @section overview_wxLog_Trace_Masks Deriving your own log target
+ @section overview_wxLog_deriving Deriving your own log target
There are two functions which must be implemented by any derived class to
actually process the log messages: DoLog() and
mask had been added before to the list of allowed ones.
For example,
- @begincode
+ @code
wxLogTrace( wxTraceRefCount|wxTraceOleCalls, "Active object ref count: %d", nRef );
@endcode
will do something only if the current trace mask contains both
@c wxTraceRefCount and @c wxTraceOle, but
- @begincode
+ @code
wxLogTrace( wxTRACE_OleCalls, "IFoo::Bar() called" );
@endcode
will log the message if it was preceded by
- @begincode
+ @code
wxLog::AddTraceMask( wxTRACE_OleCalls);
@endcode
"[%d/%b/%y %H:%M:%S] " which gives something like "[17/Sep/98 22:10:16] "
(without quotes) for the current date. Setting an empty string as the time
format disables timestamping of the messages completely.
- @note Timestamping is disabled for Visual C++ users in debug builds by
- default because otherwise it would be impossible to directly go to the line
- from which the log message was generated by simply clicking in the debugger
- window on the corresponding error message. If you wish to enable it, please
- use SetTimestamp() explicitly. See also
+ See also
@li AddTraceMask()
@li RemoveTraceMask()
@li ClearTraceMasks()
@li SetRepetitionCounting()
@li GetRepetitionCounting()
+ @note Timestamping is disabled for Visual C++ users in debug builds by
+ default because otherwise it would be impossible to directly go to the line
+ from which the log message was generated by simply clicking in the debugger
+ window on the corresponding error message. If you wish to enable it, please
+ use SetTimestamp() explicitly.
+
@section overview_wxLog_Target Manipulating the log target
The functions in this section work with and manipulate the active log