5 stable releases
Uses new Rust 2024
| new 1.3.1 | Feb 25, 2026 |
|---|---|
| 1.3.0 | Jan 19, 2026 |
| 1.2.0 | Jan 19, 2026 |
| 1.1.0 | Jan 19, 2026 |
| 1.0.0 | Jan 17, 2026 |
#560 in Debugging
16KB
148 lines
Mogh Logger
Configurable application level logger. Handles internals for multiple output modes including open telemetry.
struct Config;
// Sets output to JSON
impl mogh_logger::LogConfig for Config {
fn stdio(&self) -> mogh_logger::StdioLogMode {
mogh_logger::StdioLogMode::Json
}
fn targets(&self) -> &[String] {
use std::sync::LazyLock;
static TARGETS: LazyLock<Vec<String>> =
LazyLock::new(|| {
["binary_name"].into_iter().map(str::to_string).collect()
});
&TARGETS
}
}
// On application startup
mogh_logger::init(Config)?;
Dependencies
~16–32MB
~341K SLoC