The default implementation for the log function. Custom log functions may forward log messages to this function.
Uses a 64-byte buffer for formatted printing which is flushed before this function returns.
pub fn defaultLog(
comptime level: Level,
comptime scope: @EnumLiteral(),
comptime format: []const u8,
args: anytype,
) void
pub fn defaultLog(
comptime level: Level,
comptime scope: @EnumLiteral(),
comptime format: []const u8,
args: anytype,
) void {
const io = std.Options.debug_io;
const prev = io.swapCancelProtection(.blocked);
defer _ = io.swapCancelProtection(prev);
var buffer: [64]u8 = undefined;
const stderr = std.debug.lockStderr(&buffer).terminal();
defer std.debug.unlockStderr();
return defaultLogFileTerminal(level, scope, format, args, stderr) catch {};
}