compiler: update logFn to use color

To match the new default implementation. In fact, I implemented this by
simply dispatching *to* the default implementation after the debug log
guard; no need to complicate things!
This commit is contained in:
Matthew Lugg 2025-11-10 12:55:39 +00:00
parent cde865e06a
commit 6d280dc1b0
No known key found for this signature in database
GPG key ID: 3F5B7DCCBF4AF02E

View file

@ -155,11 +155,8 @@ pub fn log(
} else return;
}
const prefix1 = comptime level.asText();
const prefix2 = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): ";
// Print the message to stderr, silently ignoring any errors
std.debug.print(prefix1 ++ prefix2 ++ format ++ "\n", args);
// Otherwise, use the default implementation.
std.log.defaultLog(level, scope, format, args);
}
var debug_allocator: std.heap.DebugAllocator(.{