/* * 2D Game Engine * Logger.h: * Based on pikuma.com 2D game engine in C++ and Lua course * Copyright (c) 2021 986-Studio. All rights reserved. * * Created by Manoƫl Trapier on 11/02/2021. */ #ifndef GAMEENGINE_LOGGER_H #define GAMEENGINE_LOGGER_H #include #include typedef enum LogType { LOG_LOG = 0, LOG_ERROR, LOG_WARNING, LOG_INFO, LOG_CRITICAL, LOG_DEBUG, } LogType; typedef struct LogEntry { LogType type; time_t timestamp; char *message; } LogEntry; class Logger { public: /* C++ is stupid. */ static std::vector messages; static void Log(const char *message, ...); static void Error(const char *message, ...); static void Warning(const char *message, ...); static void Info(const char *message, ...); static void Critical(const char *message, ...); static void Debug(const char *message, ...); }; #endif /* GAMEENGINE_LOGGER_H */