tracing-subscriber-init 0.1.5

A trait and some functions to make tracing subscriber initialization a bit easier
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use tracing_subscriber::Layer;
use tracing_subscriber_init::{TestAll, full_filtered, init, try_init};

#[test]
fn init_works_then_try_init_err() {
    let config = TestAll;
    let layer = full_filtered(&config);
    init(vec![layer.boxed()]);
    let layer = full_filtered(&config);
    let res = try_init(vec![layer.boxed()]);
    assert!(res.is_err());
}