ZAP Release v0.10.1
Updates
Rebased Zap's logging on Zig's std.lo 4A4A g
Zap's logging is now based on zig's std.log
.
You can set a custom log level just for Zap in your Zig projects like
this:
pub const std_options: std.Options = .{
// general log level
.log_level = .info,
.log_scope_levels = &[_]std.log.ScopeLevel{
// log level specific to zap
.{ .scope = .zap, .level = .debug },
},
};
Low-level access to facil.io's logging facilities is provided by
zap.Logging
.
Using it
In your zig project folder (where build.zig
is located), run:
zig fetch --save "git+https://github.com/zigzap/zap#v0.10.1"
Then, in your build.zig
's build
function, add the following before
b.installArtifact(exe)
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
.openssl = false, // set to true to enable TLS support
});
exe.root_module.addImport("zap", zap.module("zap"));