Trait flexi_logger::filter::LogLineFilter [−][src]
pub trait LogLineFilter {
fn write(
&self,
now: &mut DeferredNow,
record: &Record<'_>,
log_line_writer: &dyn LogLineWriter
) -> Result<()>;
}
Expand description
Trait of the filter object.
Required methods
fn write(
&self,
now: &mut DeferredNow,
record: &Record<'_>,
log_line_writer: &dyn LogLineWriter
) -> Result<()>
fn write(
&self,
now: &mut DeferredNow,
record: &Record<'_>,
log_line_writer: &dyn LogLineWriter
) -> Result<()>
Each log line that flexi_logger
would write to the configured output channel is
sent to this method.
Note that the log line only appears in the configured output channel if the
filter implementation forwards it to the provided LogLineWriter
.
Errors
If writing to the configured output channel fails.