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: bool
Whether to use structured logging
format: String
Log format (terminal or json)
level: String
Log level
include_location: bool
Include source code location
include_thread_id: bool
Include thread ID
include_trace_id: bool
Include trace ID in logs
propagate_trace_id: bool
Propagate trace ID from request headers
trace_id_header: String
Header 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