pub struct LogPolicy {
pub full_paths: bool,
pub sensitivity: Sensitivity,
pub paths: PathAliases,
/* private fields */
}Expand description
Filters events before formatting and sanitizes values before ordinary sinks.
Fields§
§full_paths: boolEnables full typed-path output only by explicit configuration.
sensitivity: SensitivitySafe, Diagnostic or explicit encrypted Sensitive output.
paths: PathAliasesTrusted aliases for typed local path fields.
Implementations§
Source§impl LogPolicy
impl LogPolicy
Sourcepub fn new(verbosity: Verbosity) -> LogPolicy
pub fn new(verbosity: Verbosity) -> LogPolicy
Creates a safe policy with one global verbosity threshold.
Sourcepub fn set_component(
&mut self,
component: impl Into<String>,
verbosity: Verbosity,
)
pub fn set_component( &mut self, component: impl Into<String>, verbosity: Verbosity, )
Overrides a component threshold without changing the global threshold.
Sourcepub fn allows(&self, event: &LogEvent) -> bool
pub fn allows(&self, event: &LogEvent) -> bool
Reports whether an event is selected before serialization or sink I/O.
Sourcepub fn sanitize(&self, event: &LogEvent) -> LogEvent
pub fn sanitize(&self, event: &LogEvent) -> LogEvent
Produces the event accepted by its configured sensitivity boundary.
In Safe and Diagnostic modes all normal sinks receive redacted secrets
and aliased typed paths. Sensitive mode is routed only to DNT sinks by
the dispatcher; fields marked with LogEvent::secret remain redacted
even there because they represent prohibited credential material.
Sourcepub fn sanitize_owned(&self, value: LogEvent) -> LogEvent
pub fn sanitize_owned(&self, value: LogEvent) -> LogEvent
Sanitizes an owned event without cloning its message or metadata.
Sourcepub const fn sensitive_warning() -> &'static str
pub const fn sensitive_warning() -> &'static str
Returns the warning an application must surface when it enables encrypted sensitive diagnostics.