cpu: fix changing modes

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2024-06-11 23:23:48 +05:30
parent 9e6b121918
commit f34efb183f
3 changed files with 34 additions and 12 deletions

View File

@@ -48,6 +48,15 @@ class Logger {
}
}
template<typename... Args>
void info_bold(const std::format_string<Args...>& fmt, Args&&... args) {
if (level & static_cast<uint8_t>(LogLevel::Info)) {
print(stream, "{}{}[INFO] ", ansi::WHITE, ansi::BOLD);
log(fmt, std::forward<Args>(args)...);
print(stream, ansi::RESET);
}
}
template<typename... Args>
void warn(const std::format_string<Args...>& fmt, Args&&... args) {
if (level & static_cast<uint8_t>(LogLevel::Warn)) {