#ifndef LOGGER_H_ #define LOGGER_H_ #include #include #include // Utility: Concatenate any types into a string template std::string sstr(Args&&... args) { std::ostringstream stream; stream << std::dec; ((stream << args), ...); return stream.str(); } // Log types enum class LogType { info = 0, warn, error }; // Log entry structure struct LogEntry { LogType type{LogType::info}; std::string message{}; }; // Logger class class Logger { public: static void info(const std::string& message); static void warn(const std::string& message); static void error(const std::string& message); [[nodiscard]] static const std::vector& messages() { return messages_; } static void clear() { messages_.clear(); } private: inline static std::vector messages_{}; }; #endif // LOGGER_H_