Commit 6d280dc1b0

Matthew Lugg <mlugg@mlugg.co.uk>
2025-11-10 13:55:39
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!
1 parent cde865e
Changed files (1)
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(.{