Logging

8 projects

Rust logging is split between a facade and an implementation. The log crate defines macros such as info! and warn! that libraries call, and the application picks one backend at startup: env_logger or pretty_env_logger for simple filtered output, log4rs for file appenders and rotation configured in YAML, and fast_log or logforth for other setups. Libraries should depend only on log or tracing, never on a backend.

tracing, from the Tokio project, is now the common choice for applications. Besides events it records spans, which carry context across await points, so a log line from deep inside an async handler still shows which request it belongs to. tracing-subscriber formats output and filters by level and module, and exporters connect it to OpenTelemetry, Jaeger and similar systems.

slog was the earlier structured logging library and is still used in some older codebases. For a new project, use tracing in applications, especially async ones, and let it collect output from crates that use log through its compatibility layer. If you need JSON output for a log aggregator, tracing-subscriber's JSON formatter handles it without changing call sites, and the same instrumentation can later feed OpenTelemetry.

tklogby donnie4w

Lightweight and efficient rust structured log library with support for log levels, file segmentation, compressed archiving.

tklog0.3.02.9k/90d updated 1y ago

127

log4rsby estk

Highly configurable logging framework modeled after Java's Logback and log4j libraries

log4rs1.4.02.2m/90d updated 1d ago

1.1k

logforthby fast

A versatile, extensible, and easy-to-use logging framework for Rust applications. It allows you to configure multiple dispatches, filters, and appenders to customize your logging setup according to your needs.

logforth0.30.1244.6k/90d updated 7d ago

237

fast_logby rbatis

Async log High-performance asynchronous logging

fast_log1.7.1014.4k/90d updated 16d ago

269

logby rust-lang

Logging implementation

log0.4.34334.8m/90d updated 3d ago

2.6k

slogby slog-rs

Structured, composable logging

slog2.8.29.1m/90d updated 4mo ago

1.7k

tracingby tokio-rs

An application level tracing framework for async-aware structured logging, error handling, metrics, and more

tracing0.1.44229.4m/90d updated 11d ago

6.9k

Built on the open rust-unofficial/awesome-rust list by its contributors, licensed CC0 1.0. Crate Atlas is an independent project, not affiliated with the list's maintainers.

About Synced Oct 21, 2026

© 2026 Crate Atlas

Esc

Type to search every entry. ↑↓ to move, Enter to open.