git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@706
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool HasPendingMessages() const { return m_bHasMessages; }
// only one sink is active at each moment
bool HasPendingMessages() const { return m_bHasMessages; }
// only one sink is active at each moment
+ // get current log target, will call wxApp::CreateLogTarget() to create one
+ // if none exists
+ static wxLog *GetActiveTarget();
// change log target, pLogger = NULL disables logging. if bNoFlashOld is true,
// the old log target isn't flashed which might lead to loss of messages!
// returns the previous log target
// change log target, pLogger = NULL disables logging. if bNoFlashOld is true,
// the old log target isn't flashed which might lead to loss of messages!
// returns the previous log target
-wxLog *wxLog::SetActiveTarget(wxLog *pLogger)
+wxLog *wxLog::SetActiveTarget(wxLog *pLogger, bool bNoFlashOld)
{
// flush the old messages before changing
{
// flush the old messages before changing
- if ( ms_pLogger != NULL )
+ if ( (ms_pLogger != NULL) && !bNoFlashOld )
ms_pLogger->Flush();
wxLog *pOldLogger = ms_pLogger;
ms_pLogger->Flush();
wxLog *pOldLogger = ms_pLogger;
// do it right now to block any new calls to Flush() while we're here
m_bHasMessages = FALSE;
// do it right now to block any new calls to Flush() while we're here
m_bHasMessages = FALSE;
// @@@ ugly...
// concatenate all strings (but not too many to not overfill the msg box)
// @@@ ugly...
// concatenate all strings (but not too many to not overfill the msg box)
// open file
// ---------
wxFile file;
// open file
// ---------
wxFile file;
if ( wxFile::Exists(szFileName) ) {
bool bAppend = FALSE;
wxString strMsg;
if ( wxFile::Exists(szFileName) ) {
bool bAppend = FALSE;
wxString strMsg;
if ( m_pOldLog != NULL )
m_pOldLog->Flush();
if ( m_pOldLog != NULL )
m_pOldLog->Flush();
- m_bHasMessages = FALSE;
+ m_bHasMessages = FALSE;
}
void wxLogWindow::DoLog(wxLogLevel level, const char *szString)
}
void wxLogWindow::DoLog(wxLogLevel level, const char *szString)