pub struct Config {
pub min_level: LogLevel,
pub output: OutputConfig,
pub performance: PerformanceConfig,
pub visualization: VisualizationConfig,
}Expand description
Main configuration for the logger.
Combines output, performance, and visualization settings with a builder pattern for easy configuration.
Fields§
§min_level: LogLevel§output: OutputConfig§performance: PerformanceConfig§visualization: VisualizationConfigImplementations§
Source§impl Config
impl Config
Sourcepub fn with_min_level(self, level: LogLevel) -> Self
pub fn with_min_level(self, level: LogLevel) -> Self
Sets the minimum log level for filtering messages.
Sourcepub fn with_console_output(self, enabled: bool) -> Self
pub fn with_console_output(self, enabled: bool) -> Self
Enables or disables console output.
Sourcepub fn with_file_output<P: Into<PathBuf>>(self, path: P) -> Self
pub fn with_file_output<P: Into<PathBuf>>(self, path: P) -> Self
Enables file output with the specified path.
Sourcepub fn with_json_format(self, enabled: bool) -> Self
pub fn with_json_format(self, enabled: bool) -> Self
Enables or disables JSON format for structured logging.
Sourcepub fn with_colored_output(self, enabled: bool) -> Self
pub fn with_colored_output(self, enabled: bool) -> Self
Enables or disables colored console output.
Sourcepub fn with_profiling(self, enabled: bool) -> Self
pub fn with_profiling(self, enabled: bool) -> Self
Enables or disables performance profiling.
Sourcepub fn with_monitoring(self, enabled: bool) -> Self
pub fn with_monitoring(self, enabled: bool) -> Self
Enables or disables system monitoring.
Sourcepub fn with_buffer_size(self, size: usize) -> Self
pub fn with_buffer_size(self, size: usize) -> Self
Sets the buffer size for buffered output.
Sourcepub fn with_file_rotation(self, max_size: u64, max_files: u32) -> Self
pub fn with_file_rotation(self, max_size: u64, max_files: u32) -> Self
Configures file rotation with maximum file size and file count.
Sourcepub fn with_buffering(self, enabled: bool) -> Self
pub fn with_buffering(self, enabled: bool) -> Self
Enables or disables buffered output.
Sourcepub fn with_component_tracking(self, enabled: bool) -> Self
pub fn with_component_tracking(self, enabled: bool) -> Self
Enables or disables component tracking.
Sourcepub fn with_chart_config(self, config: ChartConfig) -> Self
pub fn with_chart_config(self, config: ChartConfig) -> Self
Sets the chart configuration for visualization.
Sourcepub fn with_auto_generate_charts(self, enabled: bool) -> Self
pub fn with_auto_generate_charts(self, enabled: bool) -> Self
Enables or disables automatic chart generation.
Sourcepub fn with_chart_output_directory<P: Into<PathBuf>>(self, path: P) -> Self
pub fn with_chart_output_directory<P: Into<PathBuf>>(self, path: P) -> Self
Sets the output directory for generated charts.
Sourcepub fn development() -> Self
pub fn development() -> Self
Creates a preset development configuration.
Includes debug logging, colored console output, profiling, and component tracking.
Sourcepub fn production<P: Into<PathBuf>>(log_file: P) -> Self
pub fn production<P: Into<PathBuf>>(log_file: P) -> Self
Creates a preset production configuration.
Uses info-level logging, JSON format, file output, and system monitoring.
Sourcepub fn performance_analysis<P: Into<PathBuf>>(output_dir: P) -> Self
pub fn performance_analysis<P: Into<PathBuf>>(output_dir: P) -> Self
Creates a configuration optimized for performance analysis with visualization.
Includes all tracking and monitoring features with timeline chart generation.