Repository navigation
Prepare Chroma Logger 0.2.0-rc.1 for Zig 0.16 - #1
Merged
Merged
Conversation
adia-dev
marked this pull request as ready for review
August 1, 2026 21:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release status
This PR targets
v0.2.0-rc.1, an experimental release candidate. The current implementation is intended for CLI tools, development utilities, and modest logging volume—not high-throughput or latency-sensitive logging workloads.The README now documents the synchronous stderr design, current performance limitations, and an experimental roadmap for providers, structured records, file output, buffering, and syslog. Those larger APIs are intentionally deferred so this release can gather feedback around a focused console logger.
What changed
Logger(comptime config)typeWhy
The previous implementation had three mostly duplicated output paths, ignored scopes, always emitted ANSI, hard-coded a UTC+1 offset, swallowed every writer concern inside the only API, and had no automated tests. Its Chroma directives and Zig build APIs were also outdated.
The release candidate keeps formatting and configuration at comptime while making the runtime responsibilities explicit: read the clock, choose ANSI or plain output, substitute Zig arguments, acquire the stderr lock, and write the line.
Compatibility
This is a breaking v0.2 release candidate for Zig 0.16. Message directives are namespaced (
{red}becomes{#red}), andtimeBasedLog/defaultLogare replaced byLoggerlayout configuration. The defaultchroma_logger.logentry point remains available.Validation
zig fmt --check .zig build testzig build benchmark -Doptimize=ReleaseFastzig build -Doptimize=ReleaseFastzig build -Dtarget=x86_64-linuxzig build -Dtarget=aarch64-linuxzig build -Dtarget=x86_64-windowszig build -Dtarget=aarch64-macosvhs validate docs/demo.tapeLive demo