Gandalf-Le-Dev/zigbeam
A std.log compliant colored logging library for Zig
Structured Logging library for the Zig language
You can fetch Zigbeam with this command
zig fetch --save=zigbeam git+https://github.com/Gandalf-Le-Dev/zigbeam/#HEAD
It will fetch the master version. If you wish to fetch a specific version, replace #HEAD
with the commit hash.
Then in your build.zig you must add:
const zigbeam_dep = b.dependency("zigbeam", .{});
const zigbeam_mod = zigbeam_dep.module("zigbeam");
exe.root_module.addImport("zigbeam", zigbeam_mod);
const std = @import("std");
const zigbeam = @import("zigbeam");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var log = try zigbeam.Logger.init(allocator);
defer log.deinit();
try log.info("Zigbeam is working!");
}