From ec06dab96452fb0d3b4c93e71dbdf9869e39f7e5 Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 18 May 2026 23:29:24 +0200 Subject: [PATCH] logging --- log.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 log.hpp diff --git a/log.hpp b/log.hpp new file mode 100644 index 0000000..0f4ab06 --- /dev/null +++ b/log.hpp @@ -0,0 +1,16 @@ +#pragma once +#include + +namespace ircolib { +template +void panic(std::format_string fmt, Args &&...args) { + std::print("[FATAL] "); + std::println(fmt, std::forward(args)...); + exit(1); +} +template +void warn(std::format_string fmt, Args &&...args) { + std::print("[WARN] "); + std::println(fmt, std::forward(args)...); +} +} // namespace ircolib