2023-01-05 10:27:14 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2023-01-29 08:21:22 +00:00
|
|
|
struct LogEntry {
|
|
|
|
time_t time;
|
|
|
|
std::string message;
|
2023-01-05 10:27:14 +00:00
|
|
|
|
2023-01-29 08:21:22 +00:00
|
|
|
LogEntry() = default;
|
|
|
|
LogEntry(time_t time_, std::string message_);
|
|
|
|
};
|
|
|
|
extern std::vector<LogEntry> log_entries;
|
|
|
|
|
|
|
|
std::string format_log(const LogEntry& entry);
|
|
|
|
void print_log(const LogEntry& entry);
|
|
|
|
void log(LogEntry entry, bool print = true);
|
2023-01-07 09:15:21 +00:00
|
|
|
void log(std::string entry);
|