v0.2.5-pre.010.fix.001
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
// file: crates/ksp-logging-lib/src/domain.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
std::thread_local! {
|
||||
static CURRENT_DOMAIN: std::cell::RefCell<std::option::Option<std::string::String>> = const { std::cell::RefCell::new(std::option::Option::None) };
|
||||
}
|
||||
|
||||
/// Crate-internal `DomainContextLayer` state shared across the owning crate.
|
||||
pub(crate) struct DomainContextLayer;
|
||||
|
||||
impl DomainContextLayer {
|
||||
/// Creates a new `DomainContextLayer` value.
|
||||
pub(crate) const fn new() -> Self {
|
||||
return Self;
|
||||
}
|
||||
@@ -99,6 +101,7 @@ impl tracing::field::Visit for DomainVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
/// Executes the crate-internal current domain matches operation for the owning module.
|
||||
pub(crate) fn current_domain_matches(selectors: &[std::string::String]) -> bool {
|
||||
if let [selector] = selectors
|
||||
&& selector == "*"
|
||||
|
||||
Reference in New Issue
Block a user