chore(config): add log message

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-17 17:38:41 -03:00
parent fc53a40b3c
commit 2474daa3ae
1 changed files with 3 additions and 0 deletions

View File

@ -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);