From 8aef7f710d64e1bf4893ed94bd16d7ba4cd0f040 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Mon, 6 Jun 2011 14:48:02 +1000 Subject: [PATCH] Fixed the logger properly --- Projects/CodeBlocks/SleepyHead.depend | 2 +- src/SleepyHeadApp.cpp | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Projects/CodeBlocks/SleepyHead.depend b/Projects/CodeBlocks/SleepyHead.depend index 3cfe8e5d..10322693 100644 --- a/Projects/CodeBlocks/SleepyHead.depend +++ b/Projects/CodeBlocks/SleepyHead.depend @@ -8231,7 +8231,7 @@ -1307275348 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadApp.cpp +1307335612 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadApp.cpp "wx_pch.h" diff --git a/src/SleepyHeadApp.cpp b/src/SleepyHeadApp.cpp index 07d88fa6..743cc59b 100644 --- a/src/SleepyHeadApp.cpp +++ b/src/SleepyHeadApp.cpp @@ -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...") );