pub trait Target:
Send
+ Sync
+ TargetClone {
// Required method
fn write(&self, level: LogLevel, formatted: &str) -> Result<(), Error>;
// Provided methods
fn filter_level(&self) -> Option<LogLevel> { ... }
fn id(&self) -> TargetId { ... }
}Expand description
Defines an output destination for log messages.
This trait allows the logger to write formatted messages to different destinations such as console, files, or custom targets.
Implementors must be thread-safe (Send + Sync) and cloneable.
Required Methods§
Provided Methods§
Sourcefn filter_level(&self) -> Option<LogLevel>
fn filter_level(&self) -> Option<LogLevel>
Returns a custom filter level for the target. If the target has a filter level set, log messages with a lower level will be ignored.