From 40062d4dfeb962ea0819815c0ca3bff859e75f1b Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:13:10 -0300 Subject: [PATCH] chore(config): add log message --- src/config.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config.zig b/src/config.zig index 5de5ae0..7a2c0c5 100644 --- a/src/config.zig +++ b/src/config.zig @@ -3,6 +3,7 @@ const toml = @import("toml"); const Allocator = std.mem.Allocator; +const log = std.log.scoped(.Config); var state: Config = .{}; const Config = struct { @@ -52,6 +53,8 @@ pub fn load(allocator: Allocator, config_path: []const u8) !void { var config_file = try std.fs.cwd().openFile(config_path, .{}); defer config_file.close(); + log.info("loaded from {s}", .{config_path}); + const contents = try config_file.readToEndAlloc(allocator, try config_file.getEndPos()); defer allocator.free(contents);