// // Created by Marc Rousavy on 05.03.24. // #pragma once #include #include #include namespace margelo { class Logger { private: Logger() = delete; public: template inline static void log(const std::string& tag, const std::string& message, Args&&... args) { try { std::string formattedMessage = std::format(message, std::forward(args)...); std::cout << "[" << tag << "] " << formattedMessage << std::endl; } catch (const std::format_error& e) { std::cerr << "Formatting error: " << e.what() << std::endl; } } }; } // namespace margelo