Skip to main content

LineRedactor

Trait LineRedactor 

Source
pub trait LineRedactor:
    Send
    + Sync
    + 'static {
    // Required methods
    fn redact<'a>(&self, line: &'a [u8]) -> Cow<'a, [u8]>;
    fn redact_json(&self, value: &mut Value);
}
Expand description

Rewrites a formatted log line before it is written.

Required Methods§

Source

fn redact<'a>(&self, line: &'a [u8]) -> Cow<'a, [u8]>

Source

fn redact_json(&self, value: &mut Value)

Redacts the strings of a log event, object keys included, before a structured formatter escapes them.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§