mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
Make this log better
This commit is contained in:
@@ -1642,11 +1642,11 @@ pub fn read(fd: bun.FileDescriptor, buf: []u8) Maybe(usize) {
|
||||
.mac => {
|
||||
const rc = system.@"read$NOCANCEL"(fd.cast(), buf.ptr, adjusted_len);
|
||||
|
||||
log("read({}, {d}) = {d} ({any})", .{ fd, adjusted_len, rc, debug_timer });
|
||||
|
||||
if (Maybe(usize).errnoSysFd(rc, .read, fd)) |err| {
|
||||
log("read({}, {d}) = {s} ({any})", .{ fd, adjusted_len, err.err.name(), debug_timer });
|
||||
return err;
|
||||
}
|
||||
log("read({}, {d}) = {d} ({any})", .{ fd, adjusted_len, rc, debug_timer });
|
||||
|
||||
return Maybe(usize){ .result = @as(usize, @intCast(rc)) };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user