Registry / logging / slog-try

slog-try

JSON →
library1.0.2rscratesunverified

Convenience macros for logging with an optional slog Logger.

# Cargo.toml [dependencies] slog-try = "1.0.2"
INSTALL
IMPORT
SIG · SLOG-TRY
S
slog-try
loggingrustv1.0.2
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.

try_log
use slog_try::try_log;

Log messages with optional slog Logger using convenient macros.

use slog_try::try_log; fn main() { let logger = slog::Logger::root(slog::Discard, o!()); try_log!(logger, slog::Level::Info, "Hello, {}!", "world"); }
Debug
Known issues
gotchaRequires `slog` crate as a dependency; macros may silently fail if logger is not provided.
fix
Ensure `slog` is in Cargo.toml and logger is properly initialized.
affects: >=1.0.2
Upgrade
Version history
1.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
36
Amazon
1
Resources
slog-try — cargo add slog-try · libregistry