X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54e280d8601f48d80bc2fc1d882b43a5f664c999..c8c77ee2af68bcea8ba157b4d5a4e2cd5b4912bd:/docs/doxygen/overviews/log.h
diff --git a/docs/doxygen/overviews/log.h b/docs/doxygen/overviews/log.h
index 7acc7e4a7e..916343b8c2 100644
--- a/docs/doxygen/overviews/log.h
+++ b/docs/doxygen/overviews/log.h
@@ -11,7 +11,7 @@
@page overview_log wxLog Classes Overview
Classes: wxLog, wxLogStderr, wxLogStream, wxLogTextCtrl, wxLogWindow, wxLogGui, wxLogNull, wxLogBuffer,
- wxLogChain, wxLogInterposer, wxLogInterposerTemp, wxStreamToTextRedirector
+ wxLogChain, wxLogInterposer, wxLogInterposerTemp, wxStreamToTextRedirector, wxLogFormatter
Table of contents:
@li @ref overview_log_introduction
@@ -20,7 +20,6 @@ Table of contents:
@li @ref overview_log_mt
@li @ref overview_log_customize
@li @ref overview_log_tracemasks
-@li @ref overview_log_timestamps
@@ -275,8 +274,15 @@ want to redirect the log output elsewhere, without taking into account the
level of the message. If you do want to handle messages of different levels
differently, then you should override wxLog::DoLogTextAtLevel().
-Finally, if more control over the output format is needed, then the first
-function must be overridden as it allows to construct custom messages
+Additionally, you can customize the way full log messages are constructed from
+the components (such as time stamp, source file information, logging thread ID
+and so on). This task is performed by wxLogFormatter class so you need to
+derive a custom class from it and override its Format() method to build the log
+messages in desired way. Notice that if you just need to modify (or suppress)
+the time stamp display, overriding FormatTime() is enough.
+
+Finally, if even more control over the output format is needed, then
+DoLogRecord() can be overridden as it allows to construct custom messages
depending on the log level or even do completely different things depending
on the message severity (for example, throw away all messages except
warnings and errors, show warnings on the screen and forward the error
@@ -316,30 +322,10 @@ wxLogTrace( wxTRACE_OleCalls, "IFoo::Bar() called" );
will log the message if it was preceded by:
@code
-wxLog::AddTraceMask( wxTRACE_OleCalls);
+wxLog::AddTraceMask( wxTRACE_OleCalls );
@endcode
The standard trace masks are given in wxLogTrace() documentation.
-
-@section overview_log_timestamps Timestamps
-
-The wxLog::LogRecord() function automatically prepends a time stamp
-to all the messages. The format of the time stamp may be changed: it can be
-any string with % specifications fully described in the documentation of the
-standard @e strftime() function. For example, the default format is
-@c "[%d/%b/%y %H:%M:%S] " which gives something like @c "[17/Sep/98 22:10:16] "
-(without quotes) for the current date.
-
-Setting an empty string as the time format or calling the shortcut wxLog::DisableTimestamp(),
-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.
-
*/