Redirect error messages (but not warnings) to a second target.
More...
#include <ErrorRedirector.h>
|
| ErrorRedirector (std::unique_ptr< wxLog > &&newLog) |
|
| ~ErrorRedirector () override |
| Restores the previous log target.
|
|
void | Flush () override |
|
void | DoLogRecord (wxLogLevel level, const wxString &msg, const wxLogRecordInfo &info) override |
|
void | DetachOldLog () |
|
void | SetBatchMode () |
| Sets the "batch mode" flag that causes error messages to be output to stderr, as well.
|
|
wxLog * | GetOldLog () const |
|
void | SetLog (std::unique_ptr< wxLog > &&logger) |
|
void | SetLogThis () |
| Sets ourseves as the log target.
|
|
|
static void | LogToStdErr () |
| Output all log messages to stderr, too.
|
|
static bool | LoggingToStdErr () |
| Output all log messages to stderr, too.
|
|
|
wxLog * | m_logNew = {} |
| the current log target - equal to m_logOwned or this
|
|
wxLog *const | m_logOld = {} |
| the previous log target
|
|
std::unique_ptr< wxLog > | m_logOwned |
| the owned new log, of null if no log is owned
|
|
bool | m_batchMode = false |
|
Redirect error messages (but not warnings) to a second target.
◆ ErrorRedirector()
ErrorRedirector::ErrorRedirector |
( |
std::unique_ptr< wxLog > && |
newLog | ) |
|
|
explicit |
Sets the specified logger
(which may be NULL) as the default log target but the log messages are also passed to the previous log target if any.
◆ DetachOldLog()
void ErrorRedirector::DetachOldLog |
( |
| ) |
|
Detaches the old log target so it won't be destroyed when the wxLogChain object is destroyed.
◆ Flush()
void ErrorRedirector::Flush |
( |
| ) |
|
|
override |
This method is called from the idle loop.
All log targets collect log messages between calls to Flush.
◆ GetOldLog()
wxLog* ErrorRedirector::GetOldLog |
( |
| ) |
const |
Returns the pointer to the previously active log target (which may be NULL).
◆ SetLog()
void ErrorRedirector::SetLog |
( |
std::unique_ptr< wxLog > && |
logger | ) |
|
Sets and takes ownership of another log target to use (may be nullptr).
The previously owned logger - if any - is destroyed. This doesn't change the old log target value (the one the messages are forwarded to) which still remains the same as was active when wxLogChain object was created.
◆ m_messages_logPaneOnly
int ErrorRedirector::m_messages_logPaneOnly = 0 |
|
static |
A variable used by the SuppressErrorDialogs class
>=0 means: Messages should appear in the log pane only.
The documentation for this class was generated from the following files:
- /home/dauti/Software/Crosscompiled-Windows-installer/build/wxmaxima-Version-22.03.0/src/ErrorRedirector.h
- /home/dauti/Software/Crosscompiled-Windows-installer/build/wxmaxima-Version-22.03.0/src/ErrorRedirector.cpp
- /home/dauti/Software/Crosscompiled-Windows-installer/build/wxmaxima-Version-22.03.0/test/unit_tests/test_ImgCell.cpp