zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 6d280dc1b0779209b4790da9e939d8254d11348a (tree)
parent cde865e06afa772983a3833920369bed5d995f8b
Author: Matthew Lugg <mlugg@mlugg.co.uk>
Date:   Mon, 10 Nov 2025 12:55:39 +0000

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!

Diffstat:
Msrc/main.zig | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/main.zig b/src/main.zig @@ -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(.{