diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-15 13:19:34 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-15 13:19:34 -0400 |
commit | 0c7cb22f3da56fde00f981f9fefb971c541bc8f1 (patch) | |
tree | 956337030ead4d59ec74480280f64d39a4b9e6d4 /src/main.cpp | |
parent | 3151ac6274e796f54f2d9269186f1fd2e69f90c3 (diff) | |
download | lingo-ap-tracker-0c7cb22f3da56fde00f981f9fefb971c541bc8f1.tar.gz lingo-ap-tracker-0c7cb22f3da56fde00f981f9fefb971c541bc8f1.tar.bz2 lingo-ap-tracker-0c7cb22f3da56fde00f981f9fefb971c541bc8f1.zip |
Logging changes
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 | ||