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