From 0c7cb22f3da56fde00f981f9fefb971c541bc8f1 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 15 May 2024 13:19:34 -0400 Subject: Logging changes --- src/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') 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 @@ #include #endif -#include "logger.h" +#include + +#include "global.h" #include "tracker_config.h" #include "tracker_frame.h" +static std::ofstream* logfile; + class TrackerApp : public wxApp { public: virtual bool OnInit() { - wxLog::SetActiveTarget(new Logger()); + logfile = new std::ofstream(GetAbsolutePath("debug.log")); + wxLog::SetActiveTarget(new wxLogStream(logfile)); + +#ifndef NDEBUG + wxLog::SetVerbose(true); + wxLog::SetActiveTarget(new wxLogWindow(nullptr, "Debug Log")); +#endif GetTrackerConfig().Load(); -- cgit 1.4.1