{"id":45680146,"url":"https://github.com/arferreira/sheen","last_synced_at":"2026-02-24T14:16:55.588Z","repository":{"id":334119905,"uuid":"1140007057","full_name":"arferreira/sheen","owner":"arferreira","description":"A polished, colorful logging library for Rust ✨","archived":false,"fork":false,"pushed_at":"2026-01-23T02:40:29.000Z","size":1120,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-23T15:32:07.832Z","etag":null,"topics":["logging","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arferreira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-22T17:49:38.000Z","updated_at":"2026-01-23T13:28:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arferreira/sheen","commit_stats":null,"previous_names":["arferreira/sheen"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/arferreira/sheen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arferreira%2Fsheen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arferreira%2Fsheen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arferreira%2Fsheen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arferreira%2Fsheen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arferreira","download_url":"https://codeload.github.com/arferreira/sheen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arferreira%2Fsheen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29785304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["logging","rust"],"created_at":"2026-02-24T14:16:54.810Z","updated_at":"2026-02-24T14:16:55.581Z","avatar_url":"https://github.com/arferreira.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sheen ✨\n\n[![Crates.io](https://img.shields.io/crates/v/sheen.svg)](https://crates.io/crates/sheen)\n[![Docs.rs](https://docs.rs/sheen/badge.svg)](https://docs.rs/sheen)\n\nA polished, colorful logging library for Rust ✨\n\n![sheen demo](sheen.gif)\n\n## Inspiration\n\nsheen is inspired by [charmbracelet/log](https://github.com/charmbracelet/log), the excellent Go logging library. We wanted to bring the same polished experience to Rust.\n\n## Features\n\n- Colorful, human-readable output\n- Structured key=value logging\n- Multiple formatters: Text, JSON, Logfmt\n- Sub-loggers with persistent fields\n- TTY detection (auto-disables colors when piped)\n- Builder pattern configuration\n- Zero config defaults\n- `log` crate compatibility (optional feature flag)\n- `tracing` crate compatibility (optional feature flag)\n\n## Installation\n\n```toml\n[dependencies]\nsheen = \"0.3\"\n```\n\nWith `log` crate support:\n\n```toml\n[dependencies]\nsheen = { version = \"0.3\", features = [\"log\"] }\n```\n\nWith `tracing` crate support:\n\n```toml\n[dependencies]\nsheen = { version = \"0.3\", features = [\"tracing\"] }\n```\n\n## Quick Start\n\n```rust\nfn main() {\n    sheen::init();\n\n    sheen::info!(\"Server started\", port = 3000);\n    sheen::debug!(\"Loading config\");\n    sheen::warn!(\"Cache miss\", key = \"user_123\");\n    sheen::error!(\"Connection failed\", attempts = 3);\n}\n```\n\nOutput:\n\n```\n14:32:15 INFO  Server started port=3000\n14:32:15 WARN  Cache miss key=\"user_123\"\n14:32:15 ERROR Connection failed attempts=3\n```\n\n## Custom Configuration\n\n```rust\nuse sheen::{Logger, Level};\n\nfn main() {\n    sheen::init_with(\n        Logger::new()\n            .level(Level::Trace)\n            .prefix(\"myapp\")\n            .timestamp(true)\n    );\n\n    sheen::trace!(\"verbose output\");\n    sheen::info!(\"ready\");\n}\n```\n\n## Sub-loggers\n\nCreate loggers with persistent fields using `.with()`:\n\n```rust\nuse sheen::{Logger, Level};\n\nlet logger = Logger::new().level(Level::Debug);\nlet req_log = logger.with(\u0026[(\"request_id\", \u0026\"abc123\")]);\n\nreq_log.info(\"started\", \u0026[]);\nreq_log.info(\"db query\", \u0026[(\"table\", \u0026\"users\")]);\nreq_log.info(\"completed\", \u0026[(\"status\", \u0026200)]);\n```\n\nOutput:\n\n```\n14:32:15 INFO  started request_id=\"abc123\"\n14:32:15 INFO  db query request_id=\"abc123\" table=\"users\"\n14:32:15 INFO  completed request_id=\"abc123\" status=200\n```\n\n## Log Crate Integration\n\nEnable the `log` feature to use sheen as a backend for the [`log`](https://crates.io/crates/log) crate. This captures logs from any dependency that uses `log::info!()`, `log::warn!()`, etc.\n\n```rust\nuse sheen::{Logger, Level};\n\nfn main() {\n    Logger::new()\n        .level(Level::Debug)\n        .init()\n        .unwrap();\n\n    // Standard log macros now go through sheen\n    log::info!(\"server started\");\n    log::warn!(\"cache nearly full\");\n}\n```\n\n## Tracing Crate Integration\n\nEnable the `tracing` feature to use sheen as a subscriber for the [`tracing`](https://crates.io/crates/tracing) crate. This captures events from any dependency that uses `tracing::info!()`, `tracing::warn!()`, etc.\n\n```rust\nuse sheen::{Logger, Level, SheenLayer};\n\nfn main() {\n    SheenLayer::new(Logger::new().level(Level::Trace)).init();\n\n    tracing::info!(\"server started\");\n    tracing::warn!(\"cache nearly full\");\n}\n```\n\n## Formatters\n\n### Text (default)\n\nColorful, human-readable output:\n\n```rust\nlet logger = Logger::new();\nlogger.info(\"hello\", \u0026[(\"port\", \u00263000)]);\n// 14:32:15 INFO  hello port=3000\n```\n\n### JSON\n\nStructured output for log aggregators:\n\n```rust\nuse sheen::{Logger, JsonFormatter};\n\nlet logger = Logger::new().formatter(JsonFormatter);\nlogger.info(\"hello\", \u0026[(\"port\", \u00263000)]);\n// {\"level\":\"info\",\"msg\":\"hello\",\"time\":\"14:32:15\",\"port\":3000}\n```\n\n### Logfmt\n\nKey=value format for Heroku, Splunk, etc:\n\n```rust\nuse sheen::{Logger, LogfmtFormatter};\n\nlet logger = Logger::new().formatter(LogfmtFormatter);\nlogger.info(\"hello\", \u0026[(\"port\", \u00263000)]);\n// level=info msg=\"hello\" time=\"14:32:15\" port=3000\n```\n\n## TTY Detection\n\nColors are automatically disabled when output is piped:\n\n```bash\n# Colors enabled\ncargo run\n\n# Colors disabled (piped to file)\ncargo run 2\u003e logs.txt\n```\n\nForce colors on or off:\n\n```rust\nlet logger = Logger::new().colorize(false);\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farferreira%2Fsheen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farferreira%2Fsheen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farferreira%2Fsheen/lists"}