mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 04:30:43 +00:00
Fixed the logger properly
This commit is contained in:
parent
336ac05302
commit
8aef7f710d
@ -8231,7 +8231,7 @@
|
||||
<wx/datectrl.h>
|
||||
<wx/dateevt.h>
|
||||
|
||||
1307275348 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadApp.cpp
|
||||
1307335612 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadApp.cpp
|
||||
"wx_pch.h"
|
||||
<iostream>
|
||||
<wx/log.h>
|
||||
|
@ -37,16 +37,12 @@ IMPLEMENT_APP(SleepyHeadApp);
|
||||
bool SleepyHeadApp::OnInit()
|
||||
{
|
||||
// Initialize the logger
|
||||
|
||||
#if defined(wxUSE_STD_IOSTREAM)
|
||||
// Standard bottled linux build, plus my WXMSW build needs it
|
||||
wxLog *logger=new wxLogStream(&std::cout);
|
||||
|
||||
|
||||
// It helps to allocate the logger on the heap.. This show work for all platforms now :)
|
||||
|
||||
wxLog *logger=new wxLogStderr(NULL); //LogWindow(NULL,wxT("Debug"),true,true);
|
||||
wxLog::SetActiveTarget(logger);
|
||||
#else
|
||||
// wxLogStream requires wxWidgets to be built with wxUSE_STD_IOSTREAM which is not default
|
||||
// use STDERR for wxLogging for better portability for now
|
||||
wxLogStderr(NULL);
|
||||
#endif
|
||||
|
||||
wxLogDebug( wxVERSION_STRING );
|
||||
wxLogDebug( wxT("Application Initialze...") );
|
||||
|
Loading…
Reference in New Issue
Block a user