From bee4194f9e12c9d2210a5ecba7249bdfe3f3deda Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 14 May 2024 12:53:59 -0400 Subject: Switch to wx logging --- src/logger.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src/logger.h') diff --git a/src/logger.h b/src/logger.h index db9bb49..b1a1d99 100644 --- a/src/logger.h +++ b/src/logger.h @@ -1,8 +1,29 @@ #ifndef LOGGER_H_6E7B9594 #define LOGGER_H_6E7B9594 -#include +#include -void TrackerLog(const std::string& text); +#ifndef WX_PRECOMP +#include +#endif + +#include +#include + +class Logger : public wxLog { + public: + Logger(); + + void Flush() override; + + ~Logger(); + + protected: + void DoLogText(const wxString& msg) override; + + private: + std::ofstream logfile_; + std::mutex file_mutex_; +}; #endif /* end of include guard: LOGGER_H_6E7B9594 */ -- cgit 1.4.1