X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8c125d136d0e87702fe8964ff3eeb586b26ec821..9151dcec4f51cf7e9c160ede683cc63392459fea:/src/common/init.cpp diff --git a/src/common/init.cpp b/src/common/init.cpp index 8e4cba57e0..a225bf6833 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -369,13 +369,19 @@ void wxEntryCleanup() // wxEntry // ---------------------------------------------------------------------------- -// for MSW with wxUSE_ON_FATAL_EXCEPTION on, wxEntry is defined in msw/main.cpp -#if !defined(__WXMSW__) || !wxUSE_ON_FATAL_EXCEPTION +// for MSW the real wxEntry is defined in msw/main.cpp +#ifndef __WXMSW__ #define wxEntryReal wxEntry -#endif // !(__WXMSW__ && wxUSE_ON_FATAL_EXCEPTION) +#endif // !__WXMSW__ 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) ) {