From e2a6cba3c6f46e9e1f88fe723554f66a5fc9a7c2 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 19 Dec 2022 21:42:53 +0100 Subject: [PATCH] Log: Update formatting to make ANSI weirdness more sensible --- kernel/src/Log.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/src/Log.cpp b/kernel/src/Log.cpp index ec884832..7342419c 100644 --- a/kernel/src/Log.cpp +++ b/kernel/src/Log.cpp @@ -22,7 +22,10 @@ static void log_serial(LogLevel level, const char* format, va_list origin) va_list ap; va_copy(ap, origin); - Serial::printf("\x1b[%sm%c\x1b[0m ", ansi_color_codes_per_log_level[(int)level], log_level_letters[(int)level]); + Serial::printf("\x1b[%sm" + "%c" + "\x1b[0m ", + ansi_color_codes_per_log_level[(int)level], log_level_letters[(int)level]); Serial::printf("%4zu.%.3zu ", Timer::ticks(), Timer::ticks_ms() - (Timer::ticks() * 1000));