Structured logging infrastructure for Smith platform
This crate provides high-performance, structured logging with NATS integration for centralized log collection across all Smith platform services.
Features
- NATS Integration: Emit logs directly to NATS subjects for centralized collection
- Performance Optimized: Asynchronous logging with batching and buffering
- Structured Format: JSON logs with consistent fields and correlation IDs
- Configurable Filtering: Per-module, per-level filtering with target-based rules
- Graceful Fallback: Console logging when NATS is unavailable
- Rate Limiting: Prevent log flooding with configurable rate limits
Usage
use ;
use Config;
// Initialize logging with NATS integration
let config = development;
let _guard = init_logging.await?;
// Use standard tracing macros
info!;
warn!;
error!;