{"id":18865998,"url":"https://github.com/adia-dev/chroma-logger-zig","last_synced_at":"2026-02-11T03:07:50.003Z","repository":{"id":222483839,"uuid":"757416974","full_name":"adia-dev/chroma-logger-zig","owner":"adia-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-04T08:06:23.000Z","size":539,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T17:10:04.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adia-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-14T13:02:43.000Z","updated_at":"2025-09-04T08:06:26.000Z","dependencies_parsed_at":"2024-12-07T22:30:07.556Z","dependency_job_id":null,"html_url":"https://github.com/adia-dev/chroma-logger-zig","commit_stats":null,"previous_names":["adia-dev/chroma-logger-zig"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/adia-dev/chroma-logger-zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Fchroma-logger-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Fchroma-logger-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Fchroma-logger-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Fchroma-logger-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adia-dev","download_url":"https://codeload.github.com/adia-dev/chroma-logger-zig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Fchroma-logger-zig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29326078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T02:08:56.257Z","status":"ssl_error","status_checked_at":"2026-02-11T02:08:51.338Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T05:05:14.958Z","updated_at":"2026-02-11T03:07:49.988Z","avatar_url":"https://github.com/adia-dev.png","language":"Zig","readme":"# Chroma Logger for Zig\n\nChroma Logger is an advanced logging library for Zig projects, designed to bring color and clarity to your application's logging output. Utilizing the Chroma library for colorized output, Chroma Logger enhances the visibility and readability of logs, making debugging and monitoring a breeze.\n\n\u003cimg width=\"760\" alt=\"chroma-logger\" src=\"https://github.com/user-attachments/assets/30b21918-6f07-4415-baac-c5ed14676f56\"\u003e\n\n## Table of Contents\n\n- [Features](#features)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Usage](#usage)\n  - [Setting Up](#setting-up)\n  - [Logging Example](#logging-example)\n- [Contributing](#contributing)\n- [License](#license)\n- [Acknowledgments](#acknowledgments)\n\n## Features\n\n- **Colorized Logging**: Leverage the full spectrum of ANSI colors, including 256-color and true color support, to differentiate log levels and messages.\n- **Flexible Configuration**: Control log levels and formatting with ease, allowing for detailed debugging sessions or streamlined production logs.\n- **Seamless Integration**: Designed to work effortlessly within the Zig ecosystem, integrating directly into your Zig build system.\n\nThe logger comes in different styles, each with its own use case:\n\n- `Time based`: Logs are colorized based on the time of day.\n\u003cfigure\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/4fd67896-5e61-42a0-8e18-6c67dc1eb464\" alt=\"Time based logger\" style=\"width:100%\"\u003e\n    \u003cfigcaption style=\"text-align: center; font-style: italic;\"\u003eChromaLogger.timeBasedLog\u003c/figcaption\u003e\n\u003c/figure\u003e\n\n- `Level based`: Logs are colorized based on the log level.\n\u003cfigure\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/9f3843a6-3be3-41a1-855a-f355178b995f\" alt=\"Default based logger\" style=\"width:100%\"\u003e\n    \u003cfigcaption style=\"text-align: center; font-style: italic;\"\u003eChromaLogger.log\u003cfigcaption\u003e\n\u003c/figure\u003e\n\n- `Default based`: Logs are displayed in the default color.\n\u003cfigure\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/f77cbc64-0d68-4576-9670-35231db74587\" alt=\"Default based logger\" style=\"width:100%\"\u003e\n    \u003cfigcaption style=\"text-align: center; font-style: italic;\"\u003eChromaLogger.defaultLog\u003cfigcaption\u003e\n\u003c/figure\u003e\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have Zig version 0.12.0-dev.2701+d18f52197 or newer installed on your system.\n\n### Installation\n\n1. Fetch the project using `zig fetch`\n\n```bash\nzig fetch --save https://github.com/adia-dev/chroma-logger-zig/archive/refs/tags/v0.1.0.tar.gz\n```\n\nOr manually paste this in your `build.zig.zon`\n\n```zig\n.dependencies = .{\n    // other deps...\n    .@\"chroma-logger\" = .{\n        .url = \"https://github.com/adia-dev/chroma-logger-zig/archive/refs/tags/v0.1.0.tar.gz\",\n        .hash = \"1220359dd4fb54e367f2aa310b2cf75227aec8f05b254ef93f3bafef34ee2aa39d0b\",\n    },\n    // ...\n},\n```\n\n2. **Build the project**:\n\nUsing the Zig build system, compile the library and example application:\n\n```bash\nzig build\n```\n\nThis command compiles the static library and an example executable demonstrating the Chroma Logger in action.\n\n## Usage\n\nTo integrate Chroma Logger into your Zig project, include it as a package in your `build.zig` file and use it to log messages in various colors and formats:\n\n### Setting Up\n\nIn your `build.zig`:\n\n```zig\nconst std = @import(\"std\");\n\npub fn build(b: *std.Build) void {\n    ...\n    const chroma_logger_dep = b.dependency(\"chroma-logger\", .{});\n    ...\n    exe.root_module.addImport(\"chroma-logger\", chroma_logger_dep.module(\"chroma-logger\"));\n    ...\n}\n```\n\n### Logging Example\n\nIn your application:\n\n```zig\nconst std = @import(\"std\");\nconst ChromaLogger = @import(\"chroma-logger\");\n\n// LogFns:\n// - ChromaLogger.defaultLog\n// - ChromaLogger.timeBasedLog\n// - ChromaLogger.log\n\npub const std_options: std.Options = .{\n    .logFn = ChromaLogger.log,\n    .log_level = .debug,\n};\n\npub fn main() !void {\n    std.log.info(\"Application started successfully\", .{});\n    std.log.err(\"Failed to load configuration\", .{});\n}\n```\n\nThis example demonstrates how to use Chroma Logger to log messages in various colors and formats. The `log` function from the `ChromaLogger` package is used to log messages, and the `std.log` package is used to log messages in the standard Zig format.\n\n## Contributing\n\nWe welcome contributions of all kinds from the community! Whether it's adding new features, improving documentation, or fixing bugs, please feel free to make a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n## Acknowledgments\n\n- [Chroma](https://github.com/adia-dev/chroma-zig) - The underlying library providing colorized output for Chroma Logger.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadia-dev%2Fchroma-logger-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadia-dev%2Fchroma-logger-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadia-dev%2Fchroma-logger-zig/lists"}