mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-06 05:34:50 -04:00
Create log files on heap.
...for imminent refactor where user can manually start/stop logging, and maybe even change the filename! *swoon*
This commit is contained in:
parent
58864ebbe7
commit
937dad62ee
8 changed files with 48 additions and 11 deletions
|
@ -60,10 +60,12 @@ struct ERTRecentEntry {
|
|||
|
||||
class ERTLogger {
|
||||
public:
|
||||
ERTLogger(const std::string& file_path);
|
||||
|
||||
void on_packet(const ert::Packet& packet);
|
||||
|
||||
private:
|
||||
LogFile log_file { "ert.txt" };
|
||||
LogFile log_file;
|
||||
};
|
||||
|
||||
using ERTRecentEntries = RecentEntries<ert::Packet, ERTRecentEntry>;
|
||||
|
@ -93,7 +95,7 @@ public:
|
|||
|
||||
private:
|
||||
ERTRecentEntries recent;
|
||||
ERTLogger logger;
|
||||
std::unique_ptr<ERTLogger> logger;
|
||||
|
||||
ERTRecentEntriesView recent_entries_view { recent };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue