Constructs a log target which sends all the log messages to the given
output stream. If it is @NULL, the messages are sent to @c cerr.
*/
- wxLogStream(std::ostream ostr = NULL);
+ wxLogStream(std::ostream *ostr = NULL);
};
@class wxLogStderr
This class can be used to redirect the log messages to a C file stream (not to
- be confused with C++ streams). It is the default log target for the non-GUI
- wxWidgets applications which send all the output to @c stderr.
+ be confused with C++ streams).
+
+ It is the default log target for the non-GUI wxWidgets applications which
+ send all the output to @c stderr.
@library{wxbase}
@category{logging}
Otherwise, it is completely hidden behind the @e wxLogXXX() functions and
you may not even know about its existence.
+ @note For console-mode applications, the default target is wxLogStderr, so
+ that all @e wxLogXXX() functions print on @c stderr when @c wxUSE_GUI = 0.
+
@section log_derivingyours Deriving your own log target
standard @e strftime() function. For example, the default format is
"[%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.
+ format or calling the shortcut wxLog::DisableTimestamp(), disables timestamping
+ of the messages completely.
See also
@li AddTraceMask()
@li SetRepetitionCounting()
@li GetRepetitionCounting()
- @note Timestamping is disabled for Visual C++ users in debug builds by
+ @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
*/
static void ClearTraceMasks();
- /**
- Disables time stamping of the log messages.
-
- @since 2.9.0
- */
- static void SetTimestamp(const wxString& format);
-
/**
Instructs wxLog to not create new log targets on the fly if there is none
currently. (Almost) for internal use only: it is supposed to be called by the
*/
static void SetTimestamp(const wxString& format);
+ /**
+ Disables time stamping of the log messages.
+
+ @since 2.9.0
+ */
+ static void DisableTimestamp();
+
/**
Sets the trace mask, see @ref log_derivingyours section for details.
*/