logmeow/log.h

20 lines
412 B
C++

#pragma once
#include <ctime>
#include <string>
#include <vector>
struct LogEntry {
struct tm time;
std::string message;
LogEntry() = default;
LogEntry(time_t time, std::string message_);
};
extern std::vector<LogEntry> log_entries;
std::string to_string(const LogEntry& entry);
void print_log(const LogEntry& entry);
void log(LogEntry entry, bool print = true);
void log(std::string entry);