• Stars
    star
    19
  • Rank 1,125,196 (Top 23 %)
  • Language
    Zig
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a thread-safe logging library for zig.

log.zig

a cross-platform, thread-safe logging library for zig.

usage

const io = @import("std").io;
const log = @import("log");
const Logger = log.Logger;

pub fn main() !void {
    var logger = Logger.new(try io.getStdOut(), true);
    logger.setBright(false);
    logger.logWarn("crime is afoot");
    logger.setColor(false);
    logger.logInfo("crime has been stopped");
}

supports

  • window's console
  • any terminal supporting ansi escape codes