Registry / logging / slog-json

slog-json

JSON →
library2.6.1rscratesunverified

JSON drain for slog-rs

# Cargo.toml [dependencies] slog-json = "2.6.1"
INSTALL
IMPORT
SIG · SLOG-JSON
S
slog-json
loggingrustv2.6.1
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.

Json
use slog_json::Json;

Creates a JSON logger that outputs to stdout.

use slog::{o, Drain, Logger}; use slog_json::Json; fn main() { let drain = Json::new(std::io::stdout()).build().fuse(); let logger = Logger::root(drain, o!("version" => "1.0")); info!(logger, "Hello, world!"); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.6.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

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