From 898b3b52c6d87b448d71b0235bce40d32453dd92 Mon Sep 17 00:00:00 2001 From: mikkelam Date: Mon, 17 Nov 2025 15:58:30 +0100 Subject: [PATCH] Switch back to std.log for debug logging --- src/cli/root.zig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/cli/root.zig b/src/cli/root.zig index 95a42ab..91a5bfb 100644 --- a/src/cli/root.zig +++ b/src/cli/root.zig @@ -3,6 +3,8 @@ const zli = @import("zli"); const builtin = @import("builtin"); const Writer = std.Io.Writer; +const log = std.log.scoped(.cli); + const Fast = @import("../lib/fast.zig").Fast; const HTTPSpeedTester = @import("../lib/http_speed_tester_v2.zig").HTTPSpeedTester; @@ -67,7 +69,7 @@ fn run(ctx: zli.CommandContext) !void { const spinner = ctx.spinner; - try spinner.print("Config: https={}, upload={}, json={}, max_duration={}s\n", .{ + log.info("Config: https={}, upload={}, json={}, max_duration={}s", .{ use_https, check_upload, json_output, max_duration, }); @@ -87,9 +89,9 @@ fn run(ctx: zli.CommandContext) !void { return; }; - try spinner.print("Got {} URLs\n", .{urls.len}); + log.info("Got {} URLs\n", .{urls.len}); for (urls) |url| { - try spinner.print("URL: {s}\n", .{url}); + log.info("URL: {s}\n", .{url}); } // Measure latency first @@ -108,7 +110,7 @@ fn run(ctx: zli.CommandContext) !void { }; if (!json_output) { - try spinner.start("Measuring download speed...", .{}); + log.info("Measuring download speed...", .{}); } // Initialize speed tester @@ -144,7 +146,7 @@ fn run(ctx: zli.CommandContext) !void { var upload_result: ?SpeedTestResult = null; if (check_upload) { if (!json_output) { - try spinner.start("Measuring upload speed...", .{}); + log.info("Measuring upload speed...", .{}); } upload_result = if (json_output) blk: {