mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
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:
parent
cde865e06a
commit
6d280dc1b0
1 changed files with 2 additions and 5 deletions
|
|
@ -155,11 +155,8 @@ pub fn log(
|
||||||
} else return;
|
} else return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const prefix1 = comptime level.asText();
|
// Otherwise, use the default implementation.
|
||||||
const prefix2 = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): ";
|
std.log.defaultLog(level, scope, format, args);
|
||||||
|
|
||||||
// Print the message to stderr, silently ignoring any errors
|
|
||||||
std.debug.print(prefix1 ++ prefix2 ++ format ++ "\n", args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var debug_allocator: std.heap.DebugAllocator(.{
|
var debug_allocator: std.heap.DebugAllocator(.{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue