pub struct LoggingConfig {
pub structured: bool,
pub format: String,
pub level: String,
pub include_location: bool,
pub include_thread_id: bool,
pub include_trace_id: bool,
pub propagate_trace_id: bool,
pub trace_id_header: String,
pub static_fields: HashMap<String, String>,
}Expand description
Logging configuration
Fields§
§structured: boolWhether to use structured logging
format: StringLog format (terminal or json)
level: StringLog level
include_location: boolInclude source code location
include_thread_id: boolInclude thread ID
include_trace_id: boolInclude trace ID in logs
propagate_trace_id: boolPropagate trace ID from request headers
trace_id_header: StringHeader name for trace ID
static_fields: HashMap<String, String>Static fields to include in all logs
Implementations§
Source§impl LoggingConfig
impl LoggingConfig
Sourcepub fn to_logger_config(&self) -> LoggerConfig
pub fn to_logger_config(&self) -> LoggerConfig
Convert to logger config
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