slog
slog copied to clipboard
Request for convenience function
Might be nice to have something like:
use slog_scope::*;
new_scope!("key" => "value", || {
info!("hi");
});
that is shorthand for:
use slog_scope::*;
with_logger(|logger| {
scope(logger.new(o!("key" => "value")), || {
info!("hi")
});
});
I'd call it with_keys
, but :+1: from me. Submit a PR and it will be there. :)