rusty_bin/monitor/config/
logger.rs

1//! Logging configuration
2use serde::{Deserialize, Serialize};
3use smartstring::alias::String;
4use std::path::PathBuf;
5
6/// Logging configuration
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct LoggerConfig {
9    /// Log level (trace, debug, info, warn, error)
10    pub level: String,
11    /// Log format (json, text, compact)
12    pub format: String,
13    /// Output destination (stdout, stderr, file)
14    pub output: String,
15    /// Path to log file when output is set to file
16    pub file_path: PathBuf,
17    /// Maximum log file size in megabytes before rotation
18    pub max_file_size_mb: u64,
19    /// Maximum number of log files to keep
20    pub max_files: u32,
21    /// Whether to rotate log files daily
22    pub rotate_daily: bool,
23    /// Whether to log trade data
24    pub log_trades: bool,
25    /// Whether to log order book data
26    pub log_orderbooks: bool,
27    /// Whether to log connection events
28    pub log_connections: bool,
29    /// Whether to log error events
30    pub log_errors: bool,
31    /// Whether to log performance metrics
32    pub log_performance: bool,
33}