⚡
Blazing Fast
Native Zig performance with async I/O and zero-copy operations
Production-ready structured logging with a clean, simple API

const std = @import("std");
const logly = @import("logly");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
// Enable ANSI colors on Windows (no-op on Linux/macOS)
_ = logly.Terminal.enableAnsiColors();
const logger = try logly.Logger.init(gpa.allocator());
defer logger.deinit();
// Each level colors the ENTIRE line (timestamp, level, message)
// @src() is optional - enables file:line display when show_filename/show_lineno are true
try logger.info(@src(), "Application started", .{}); // White line
try logger.success(@src(), "Operation completed!", .{}); // Green line
try logger.warn(@src(), "Low memory", .{}); // Yellow line (alias for warning)
try logger.err(@src(), "Connection failed", .{}); // Red line
}Add to your build.zig.zon:
.dependencies = .{
.logly = .{
.url = "https://github.com/muhammad-fiaz/logly.zig/archive/refs/tags/v0.0.4.tar.gz",
.hash = "...",
},
},