env_logger
Environment-variable-configured logging backend for Rust's log crate
Repository Health
Technical Analysis
env_logger is the de-facto default backend for Rust’s log facade, letting you control log levels and per-module filtering entirely through the RUST_LOG environment variable rather than code changes or config files. It writes human-readable, optionally colored output to stderr (or stdout) and supports fine-grained filters like RUST_LOG=my_crate=debug,other_crate=warn.
The project is a Cargo workspace that also publishes env_filter as a separate crate — the underlying filter-parsing engine env_logger builds on — so other logging backends can reuse the same RUST_LOG-style filter syntax without depending on env_logger’s full formatting/writer stack.
What You Get
- A ready-to-use
log::Logimplementation activated with a singleenv_logger::init()call RUST_LOG-style filter syntax supporting per-module and per-level granularity (e.g.my_crate=debug,hyper=warn)- Configurable output target (stderr/stdout), timestamp formats, and color support via a
BuilderAPI - A separate
env_filtercrate exposing just the filter-string parsing logic for reuse by other logging backends - Custom formatter support for fully overriding how each log record is rendered
Common Use Cases
- Adding basic, zero-config logging output to a CLI tool or service with a single
env_logger::init()call - Selectively enabling debug-level logs for one dependency while keeping others at warn/error during troubleshooting
- Building a custom logging backend that wants to reuse env_logger’s
RUST_LOGfilter parser (env_filter) without its formatter/writer - Testing binaries where log verbosity needs to be toggled per test run via environment variables rather than recompiling
Under The Hood
Architecture - the repo is a Cargo workspace with the top-level env_logger package as the umbrella crate (src/lib.rs, src/logger.rs, plus src/fmt for output formatting and src/writer for the stderr/stdout output target) and crates/env_filter as a workspace member providing the standalone RUST_LOG filter-parsing engine that env_logger depends on internally, letting other logging backends adopt the same filter syntax independently. Tech Stack - pure Rust, built on the log crate’s facade pattern (implementing its Log trait), with optional humantime/color-output dependencies gated behind Cargo features, and a workspace-wide Clippy lint configuration ([workspace.lints.clippy]) enforcing a large, curated set of lint rules across both crates. Code Quality - the tests/ directory targets specific historical correctness issues (log-in-log.rs, log_tls_dtors.rs, init-twice-retains-filter.rs, regexp_filter.rs), showing regression coverage for real bugs rather than only happy-path tests, and the workspace enforces a strict shared lint policy (unreachable_pub, unsafe_op_in_unsafe_fn, etc.) across all member crates. API Design - the common path is a single env_logger::init() call with zero required configuration, while a Builder escape hatch exposes format, filter, and target customization for more advanced setups — keeping the learning curve close to zero for the default case while still supporting deep customization.
Used by 16 apps in this directory
Murr
Databases
A RocksDB-based NVMe/S3 cache purpose-built for AI inference workloads — a faster Redis replacement optimized for batch, low-latency, zero-copy reads and writes between data pipelines and inference apps.
ParadeDB
Analytics · Databases · Search
Born out of Y Combinator's S2023 batch, ParadeDB is a Postgres extension that delivers Elasticsearch-quality BM25 search and real-time analytics without a separate search cluster to manage.
PostgresML
AI Development · Databases
Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.
Spacedrive
Collaboration · File Storage
One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.
Temps
Analytics · Devops · Monitoring
A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.
Trieve
AI Development · Developer Tools · Search
All-in-one self-hostable platform for hybrid search, RAG, recommendations, and analytics built on Rust and Qdrant.
WrenAI
AI Agents · Analytics · Data Engineering
Open-source GenBI engine that lets AI agents turn natural-language questions into governed SQL, charts, and shareable dashboards across 20+ data sources — no vendor lock-in, no black-box prompts.