diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index db7653c..5b036ea 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -4,14 +4,24 @@ | |||
4 | #include <wx/wx.h> | 4 | #include <wx/wx.h> |
5 | #endif | 5 | #endif |
6 | 6 | ||
7 | #include "logger.h" | 7 | #include <fstream> |
8 | |||
9 | #include "global.h" | ||
8 | #include "tracker_config.h" | 10 | #include "tracker_config.h" |
9 | #include "tracker_frame.h" | 11 | #include "tracker_frame.h" |
10 | 12 | ||
13 | static std::ofstream* logfile; | ||
14 | |||
11 | class TrackerApp : public wxApp { | 15 | class TrackerApp : public wxApp { |
12 | public: | 16 | public: |
13 | virtual bool OnInit() { | 17 | virtual bool OnInit() { |
14 | wxLog::SetActiveTarget(new Logger()); | 18 | logfile = new std::ofstream(GetAbsolutePath("debug.log")); |
19 | wxLog::SetActiveTarget(new wxLogStream(logfile)); | ||
20 | |||
21 | #ifndef NDEBUG | ||
22 | wxLog::SetVerbose(true); | ||
23 | wxLog::SetActiveTarget(new wxLogWindow(nullptr, "Debug Log")); | ||
24 | #endif | ||
15 | 25 | ||
16 | GetTrackerConfig().Load(); | 26 | GetTrackerConfig().Load(); |
17 | 27 | ||