#[non_exhaustive]pub struct Crates { /* private fields */ }Expand description
Dependency crates whose log names and maximum levels are controlled by this logger.
Crates::own takes crate names in Rust spelling, for example
my_module_core; events from those crates retain the logger-name behavior used
without a crate policy. Other crates are labelled <module_id>.dep.<crate>, with
underscores changed to hyphens. Unless a CK_LOG directive names a
dependency, its level is capped at WARN or the module’s own resolved level,
whichever is lower. A ceiling is enforced after all CK_LOG directives;
use it for transports whose debug output may contain credentials or
connection secrets. The cap and ceilings are also checked while writing,
so an outer filter_fn cannot bypass them, although its own predicate can
still suppress events.
Implementations§
Source§impl Crates
impl Crates
Sourcepub fn own<I, S>(self, crate_names: I) -> Self
pub fn own<I, S>(self, crate_names: I) -> Self
Adds crate names that belong to this module rather than its dependencies.
Events from these crates keep the logger-name behavior used without a crate policy.
Sourcepub fn ceiling(self, crate_name: impl Into<String>, level: LevelFilter) -> Self
pub fn ceiling(self, crate_name: impl Into<String>, level: LevelFilter) -> Self
Sets the maximum level for one dependency crate.
This limit is applied after CK_LOG, so no directive can raise the
dependency above it. crate_name uses Rust crate-identifier spelling,
such as transport_layer; underscores become hyphens in the logger
label. An OFF ceiling drops the dependency’s events. This is useful when
verbose transport logs can contain credentials or connection secrets.