diff --git a/src/main.zig b/src/main.zig index 9758cfd..be609c2 100644 --- a/src/main.zig +++ b/src/main.zig @@ -211,10 +211,13 @@ pub fn main() !void { iperf3_log.err("error from iperf3: {s}", .{err}); level = loki.LogLevel.@"error"; } - } else |err| switch (err) { - error.UnknownField => iperf3_log.err("unknown field parsing json {d}", .{timestamp}), - error.UnexpectedEndOfInput => iperf3_log.err("unexpected end of input parsing json {d}", .{timestamp}), - else => iperf3_log.err("other error while parsing json {} {d}", .{ err, timestamp }), + } else |err| { + switch (err) { + error.UnknownField => iperf3_log.err("unknown field parsing json {d}", .{timestamp}), + error.UnexpectedEndOfInput => iperf3_log.err("unexpected end of input parsing json {d}", .{timestamp}), + else => iperf3_log.err("other error while parsing json {} {d}", .{ err, timestamp }), + } + level = loki.LogLevel.@"error"; } // var line = std.ArrayList(u8).init(allocator);