Crate slog_stdlog [] [src]

Standard Rust log crate adapter to slog-rs

This crate allows using slog features with code using legacy log statements.

log crate expects a global logger to be registered (popular one is env_logger) as a handler for all info!(...) and similar.

slog-stdlog will register itself as log global handler and forward all legacy logging statements to slog's Logger. That means existing logging debug! (even in dependencies crates) work and utilize slog composable drains.

See init() documentation for minimal working example.

Structs

StdLog

Drain logging Records into log crate

Functions

init

Minimal initialization with default drain

scope

Execute code in a logging scope

set_logger

Set a slog::Logger as a global log create handler

set_logger_level

Set a slog::Logger as a global log create handler

with_current_logger

Access the currently active logger