Explore projects
Rustbeginnerbackend
Structured Logging System
Structured logging library in Rust with levels, runtime filtering, JSON/text output, and multiple sinks.
5 steps
Project steps
- 01
Log trait
Defines Log trait with debug/info/warn/error methods.
- 02
Structured fields
Log! macro that accepts key=value pairs and serializes them with serde_json.
- 03
Level filtering
Env var LOG_LEVEL controls the minimum level at runtime.
- 04
Multiple sinks
Stdout sink (colored text) and file sink (JSON append).
- 05
Benchmark
Criterion benchmark: compares with println! and env_logger.
Recommended resources
Ready to build this?
Fork the repo on GitHub and start building. A mentor will review your code when you open a PR.
5 steps
Tech stack
Rustserdeserde_jsonchrono