logmeow/log.h

19 lines
393 B
C
Raw Normal View History

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;
2023-02-09 07:44:34 +00:00
std::string to_string(const LogEntry& entry);
2023-01-29 08:21:22 +00:00
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);