authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-27 09:14:04-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-27 20:56:48-07:00
log0ca2b4e0f1b34122aada3c649ce3a627f3377ca3
treeb8b22998d96d8da94c4ef3ccdc551f73bb9a9c98
parentea7d8ec14752575a68733742be2ee7a583eea49e

std.Progress: use std.log.debug rather than warn

when the errors could possibly be spammed many times

1 files changed, 3 insertions(+), 3 deletions(-)

lib/std/Progress.zig+3-3
......@@ -635,7 +635,7 @@ fn serializeIpc(start_serialized_len: usize, serialized_buffer: *Serialized.Buff
635635 const n = posix.read(fd, pipe_buf[bytes_read..]) catch |err| switch (err) {
636636 error.WouldBlock => break,
637637 else => |e| {
638 std.log.warn("failed to read child progress data: {s}", .{@errorName(e)});
638 std.log.debug("failed to read child progress data: {s}", .{@errorName(e)});
639639 main_storage.completed_count = 0;
640640 main_storage.estimated_total_count = 0;
641641 continue :main_loop;
......@@ -964,13 +964,13 @@ fn writeIpc(fd: posix.fd_t, serialized: Serialized) error{BrokenPipe}!void {
964964 if (posix.writev(fd, &vecs)) |written| {
965965 const total = header.len + storage.len + parents.len;
966966 if (written < total) {
967 std.log.warn("short write: {d} out of {d}", .{ written, total });
967 std.log.debug("short write: {d} out of {d}", .{ written, total });
968968 }
969969 } else |err| switch (err) {
970970 error.WouldBlock => {},
971971 error.BrokenPipe => return error.BrokenPipe,
972972 else => |e| {
973 std.log.warn("failed to send progress to parent process: {s}", .{@errorName(e)});
973 std.log.debug("failed to send progress to parent process: {s}", .{@errorName(e)});
974974 return error.BrokenPipe;
975975 },
976976 }