From 58c5fe3befc685d766f7e63e0e764432bea3e1a3 Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Mon, 24 Jan 2005 14:45:46 +0000 Subject: [PATCH] Create non-GUI log target until GUI logging is available, allows stderr messages in non-Unicode builds when GTK fails to initialize (Patch 1017789) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/init.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/init.cpp b/src/common/init.cpp index 8e4cba57e0..c0ce4e9bcb 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -376,6 +376,12 @@ void wxEntryCleanup() int wxEntryReal(int& argc, wxChar **argv) { +#if wxUSE_LOG + // Create a non-GUI log target, to be used until GUI (if any) is ready. + // Target will be reset by wxAppConsole::Initialize, when GUI logging will work. + wxLog::GetActiveTarget(); +#endif + // library initialization if ( !wxEntryStart(argc, argv) ) { -- 2.45.2