From: Vadim Zeitlin Date: Sun, 20 Sep 1998 21:05:19 +0000 (+0000) Subject: somehow log target wasn't being created automatically anymore. Restored. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/803bf1c5818154dbff797029441c7de0d85339d5 somehow log target wasn't being created automatically anymore. Restored. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/log.h b/include/wx/log.h index 00b4cdd1d1..0c178347d9 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -69,7 +69,13 @@ public: // sink function static void OnLog(wxLogLevel level, const char *szString) - { if ( ms_pLogger != 0 ) ms_pLogger->DoLog(level, szString); } + { + wxLog *pLogger = GetActiveTarget(); + if ( pLogger ) + { + pLogger->DoLog(level, szString); + } + } // message buffering // flush shows all messages if they're not logged immediately