From 3190035086b5a8c268d908fe4c7cc3404101c82a Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 21 Feb 2026 11:28:58 +0000 Subject: [PATCH] libmango: add temporary formatted log function --- libmango/include-user/mango/log.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libmango/include-user/mango/log.h b/libmango/include-user/mango/log.h index de1f630..6d91d41 100644 --- a/libmango/include-user/mango/log.h +++ b/libmango/include-user/mango/log.h @@ -3,8 +3,17 @@ #include +#undef TRACE + extern kern_status_t kern_log(const char *s); +#define kern_logf(...) \ + do { \ + char s[128]; \ + snprintf(s, sizeof s, __VA_ARGS__); \ + kern_log(s); \ + } while (0) + #ifdef TRACE #define kern_trace(...) kern_log(__VA_ARGS__) #define kern_tracef(...) \