]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/log.cpp
Use wxListColumnFormat for wxListCtrl::AppendColumn() format argument.
[wxWidgets.git] / src / common / log.cpp
index 5135eadaa33799aa29055274cdba6870b0bbdb6a..53ce213b5080316dacd55dd3efffa6ccd398a56a 100644 (file)
@@ -902,7 +902,14 @@ wxLogChain::wxLogChain(wxLog *logger)
     m_bPassMessages = true;
 
     m_logNew = logger;
-    m_logOld = wxLog::SetActiveTarget(this);
+
+    // Notice that we use GetActiveTarget() here instead of directly calling
+    // SetActiveTarget() to trigger wxLog auto-creation: if we're created as
+    // the first logger, we should still chain with the standard, implicit and
+    // possibly still not created standard logger instead of disabling normal
+    // logging entirely.
+    m_logOld = wxLog::GetActiveTarget();
+    wxLog::SetActiveTarget(this);
 }
 
 wxLogChain::~wxLogChain()