pub struct LoggingConfig {
pub level: String,
pub output_mode: OutputMode,
pub file: Option<LogFileConfig>,
pub console: Option<LogConsoleConfig>,
pub enable_request_id: bool,
pub fields: LogFieldsConfig,
pub vector: Option<VectorConfig>,
}Expand description
日志配置
Fields§
§level: String日志级别(trace | debug | info | warn | error)
output_mode: OutputMode日志输出模式(file | console | both)
file: Option<LogFileConfig>文件输出配置(output_mode 为 file 或 both 时有效)
console: Option<LogConsoleConfig>控制台输出配置(output_mode 为 console 或 both 时有效)
enable_request_id: bool是否启用 Request ID 注入
fields: LogFieldsConfig日志字段规范化配置
vector: Option<VectorConfig>Vector 日志收集器配置(可选)
Implementations§
Trait Implementations§
Source§impl Clone for LoggingConfig
impl Clone for LoggingConfig
Source§fn clone(&self) -> LoggingConfig
fn clone(&self) -> LoggingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoggingConfig
impl Debug for LoggingConfig
Source§impl Default for LoggingConfig
impl Default for LoggingConfig
Source§impl<'de> Deserialize<'de> for LoggingConfig
impl<'de> Deserialize<'de> for LoggingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LoggingConfig
impl RefUnwindSafe for LoggingConfig
impl Send for LoggingConfig
impl Sync for LoggingConfig
impl Unpin for LoggingConfig
impl UnwindSafe for LoggingConfig
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