authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-07-25 22:30:43+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-07-26 08:10:52+02:00
log3b3ce449e333c233767737b0f57bc2f01fd8beaa
tree883347678d9313872c93c41c8d49589527993afd
parent27f471860a86e8a6c3a54be8aa704d7feadf6123

tapi: do not log errors using log.err


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

src/link/tapi/yaml.zig+3-3
...@@ -197,7 +197,7 @@ pub const Value = union(enum) {...@@ -197,7 +197,7 @@ pub const Value = union(enum) {
197197
198 return Value{ .string = try arena.dupe(u8, value.string_value.items) };198 return Value{ .string = try arena.dupe(u8, value.string_value.items) };
199 } else {199 } else {
200 log.err("Unexpected node type: {}", .{node.tag});200 log.debug("Unexpected node type: {}", .{node.tag});
201 return error.UnexpectedNodeType;201 return error.UnexpectedNodeType;
202 }202 }
203 }203 }
...@@ -270,7 +270,7 @@ pub const Value = union(enum) {...@@ -270,7 +270,7 @@ pub const Value = union(enum) {
270 if (try encode(arena, elem)) |value| {270 if (try encode(arena, elem)) |value| {
271 list.appendAssumeCapacity(value);271 list.appendAssumeCapacity(value);
272 } else {272 } else {
273 log.err("Could not encode value in a list: {any}", .{elem});273 log.debug("Could not encode value in a list: {any}", .{elem});
274 return error.CannotEncodeValue;274 return error.CannotEncodeValue;
275 }275 }
276 }276 }
...@@ -432,7 +432,7 @@ pub const Yaml = struct {...@@ -432,7 +432,7 @@ pub const Yaml = struct {
432 }432 }
433433
434 const unwrapped = value orelse {434 const unwrapped = value orelse {
435 log.err("missing struct field: {s}: {s}", .{ field.name, @typeName(field.type) });435 log.debug("missing struct field: {s}: {s}", .{ field.name, @typeName(field.type) });
436 return error.StructFieldMissing;436 return error.StructFieldMissing;
437 };437 };
438 @field(parsed, field.name) = try self.parseValue(field.type, unwrapped);438 @field(parsed, field.name) = try self.parseValue(field.type, unwrapped);