mach: put logFn function to std_options

This commit is contained in:
Ali Chraghi 2023-01-19 22:36:17 +03:30 committed by Stephen Gutekanst
parent c7b9d9e107
commit 192cacb85d

View file

@ -28,7 +28,8 @@ fn writeLog(_: void, msg: []const u8) LogError!usize {
return msg.len;
}
pub fn log(
pub const std_options = struct {
pub fn logFn(
comptime message_level: std.log.Level,
comptime scope: @Type(.EnumLiteral),
comptime format: []const u8,
@ -40,6 +41,7 @@ pub fn log(
writer.print(message_level.asText() ++ prefix ++ format ++ "\n", args) catch return;
js.machLogFlush();
}
};
pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn {
_ = error_return_trace;