Registry / logging / slog-bunyan

slog-bunyan

JSON →
library2.5.0rscratesunverified

Bunyan formatter for slog-rs, outputting structured JSON logs compatible with the Bunyan CLI.

# Cargo.toml [dependencies] slog-bunyan = "2.5.0"
INSTALL
IMPORT
SIG · SLOG-BUNYAN
S
slog-bunyan
loggingrustv2.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Bunyan
use slog_bunyan::Bunyan;

Creates a Bunyan-formatted logger that writes JSON to stdout.

use slog_bunyan::Bunyan; use slog::{o, Drain}; fn main() { let drain = Bunyan::new(std::io::stdout()); let logger = slog::Logger::root(drain.fuse(), o!()); info!(logger, "Hello, Bunyan!"); }
Debug
Known issues
gotchaRequires the `slog` crate as a dependency; not standalone.
fix
Add `slog` to Cargo.toml and ensure proper drain setup.
affects: >=2.0.0
Upgrade
Version history
2.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
38
Resources
slog-bunyan — cargo add slog-bunyan · libregistry