pub struct LogConfig {
pub level: LogLevel,
pub message: Value,
pub fields: HashMap<String, Value>,
pub message_index: Option<usize>,
pub field_indices: Vec<(String, Option<usize>)>,
}Expand description
Configuration for the log function.
The message and field expressions are pre-compiled at startup.
Fields§
§level: LogLevelLog level to emit at
message: ValueJSONLogic expression to produce the log message string
fields: HashMap<String, Value>Additional structured fields: each value is a JSONLogic expression
message_index: Option<usize>Cache index for the compiled message expression
field_indices: Vec<(String, Option<usize>)>Cache indices for the compiled field expressions
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogConfig
impl<'de> Deserialize<'de> for LogConfig
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 LogConfig
impl RefUnwindSafe for LogConfig
impl Send for LogConfig
impl Sync for LogConfig
impl Unpin for LogConfig
impl UnsafeUnpin for LogConfig
impl UnwindSafe for LogConfig
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