Fix Windows CI (linux still bork)

Update unarr
Add new log options
Minor improvements
This commit is contained in:
SimoneN64
2023-06-12 18:32:13 +02:00
parent 6a7f2e144c
commit 9242fe986f
22 changed files with 157 additions and 174 deletions

View File

@@ -8,7 +8,11 @@ enum LogLevel : u8 {
Trace, Info, Debug, Warn, Error
};
#ifndef _NDEBUG
static constexpr auto globalLogLevel = Debug;
#else
static constexpr auto globalLogLevel = Warn;
#endif
template <LogLevel messageType = Info, typename ...Args>
constexpr void print(const std::string& fmt, Args... args) {
@@ -43,6 +47,11 @@ constexpr void panic(const std::string& fmt, Args... args) {
exit(-1);
}
template <typename ...Args>
constexpr void error(const std::string& fmt, Args... args) {
print<Error>(fmt + "\n", args...);
}
template <typename ...Args>
constexpr void warn(const std::string& fmt, Args... args) {
print<Warn>(fmt + "\n", args...);
@@ -57,4 +66,9 @@ template <typename ...Args>
constexpr void debug(const std::string& fmt, Args... args) {
print<Debug>(fmt + "\n", args...);
}
template <typename ...Args>
constexpr void trace(const std::string& fmt, Args... args) {
print<Trace>(fmt + "\n", args...);
}
}