pub struct SinkConfig {Show 16 fields
pub path: Option<PathBuf>,
pub rotation: Option<String>,
pub size_limit: Option<u64>,
pub retention: Option<usize>,
pub filter_min_level: Option<Level>,
pub filter_module: Option<String>,
pub filter_function: Option<String>,
pub async_write: bool,
pub buffer_size: usize,
pub flush_interval: u64,
pub max_buffered_lines: usize,
pub date_style: Option<String>,
pub date_enabled: bool,
pub format: Option<String>,
pub json: bool,
pub color: bool,
}Expand description
Configuration for a log sink.
Defines all settings for a single output destination including path, rotation, filtering, formatting, and performance options.
Fields§
§path: Option<PathBuf>File path (None = console output)
rotation: Option<String>Rotation interval: “hourly”, “daily”, “weekly”, “monthly”, “yearly”
size_limit: Option<u64>Maximum file size before rotation (bytes)
retention: Option<usize>Number of rotated files to keep (None = unlimited)
filter_min_level: Option<Level>Minimum log level to accept
filter_module: Option<String>Filter by module name
filter_function: Option<String>Filter by function name
async_write: boolEnable async writes (recommended for file sinks)
buffer_size: usizeWrite buffer size in bytes
flush_interval: u64Flush interval in milliseconds
max_buffered_lines: usizeMaximum number of buffered log records
date_style: Option<String>Custom date/time format pattern
date_enabled: boolEnable timestamp in output
format: Option<String>Custom format template string
json: boolEnable JSON output format
color: boolEnable ANSI color codes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SinkConfig
impl RefUnwindSafe for SinkConfig
impl Send for SinkConfig
impl Sync for SinkConfig
impl Unpin for SinkConfig
impl UnwindSafe for SinkConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more