openinfra-logger (Rust)
OpenInfra Logger — zero-dependency, RFC 8259-compliant structured logging. The same JSON shape is emitted by sibling implementations for Node.js, Python and Go, so polyglot stacks see a single, consistent log format.
Install
[]
= "0.1"
Quickstart
use ;
use HashMap;
Configuration
use ;
use HashMap;
let mut defaults = new;
defaults.insert;
let cfg = Config ;
let logger = new;
logger.log;
Why zero-dependency
This crate compiles with no transitive crates — only std. The trade-off:
- ✅ Faster compile, smaller binaries, no supply-chain surface, no
serdeversion churn - ✅ Works in
no_std-adjacent environments after minimal porting - ⚠️ The JSON builder is hand-rolled but RFC 8259-compliant (quotes, backslashes, control chars all escaped)
- ⚠️ Metadata values are
Stringin this version; structured/typed values land in 0.2.
Links
- Source — https://github.com/jonathascordeiro20/openinfra-logger
- Project site — https://openinfralogger.fun
- Changelog — https://github.com/jonathascordeiro20/openinfra-logger/blob/main/CHANGELOG.md
License
MIT — see LICENSE.