Skip to content

Commit 6d280dc

Browse files
committed
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 commit 6d280dc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main.zig

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,8 @@ pub fn log(
155155
} else return;
156156
}
157157

158-
const prefix1 = comptime level.asText();
159-
const prefix2 = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): ";
160-
161-
// Print the message to stderr, silently ignoring any errors
162-
std.debug.print(prefix1 ++ prefix2 ++ format ++ "\n", args);
158+
// Otherwise, use the default implementation.
159+
std.log.defaultLog(level, scope, format, args);
163160
}
164161

165162
var debug_allocator: std.heap.DebugAllocator(.{

0 commit comments

Comments
 (0)