tracing_filter/
lib.rs

1macro_rules! try_lock {
2    ($lock:expr) => {
3        try_lock!($lock, else return)
4    };
5    ($lock:expr, else $else:expr) => {
6        if let Ok(lock) = $lock {
7            lock
8        } else if ::std::thread::panicking() {
9            $else
10        } else {
11            panic!("lock poisoned")
12        }
13    }
14}
15
16mod diagnostics;
17mod layer;
18pub mod legacy;
19pub mod simple;
20
21pub(crate) const DEFAULT_ENV: &str = "RUST_LOG";
22
23#[doc(inline)]
24pub use self::{
25    diagnostics::{Diagnostics, DiagnosticsTheme},
26    layer::FilterLayer,
27};
28#[doc(no_inline)]
29pub use tracing_subscriber::layer::Filter;
30
31#[cfg(feature = "smallvec")]
32type SmallVec<T> = smallvec::SmallVec<[T; 8]>;
33#[cfg(not(feature = "smallvec"))]
34type SmallVec<T> = Vec<T>;