pub struct LogConfig {
pub level: Level,
pub format: LogFormat,
pub enable_backtraces: bool,
pub traces_sample_rate: f32,
}
Expand description
Controls the logging system.
Fields§
§level: Level
The log level for Relay.
format: LogFormat
Controls the log output format.
Defaults to LogFormat::Auto
, which detects the best format based on the TTY.
enable_backtraces: bool
When set to true
, backtraces are forced on.
Otherwise, backtraces can be enabled by setting the RUST_BACKTRACE
variable to full
.
traces_sample_rate: f32
Sets the trace sample rate for performance monitoring.
Defaults to 0.0
for release builds and 1.0
for local development builds.
Implementations§
source§impl LogConfig
impl LogConfig
sourcepub const fn level_filter(&self) -> LevelFilter
pub const fn level_filter(&self) -> LevelFilter
Returns the tracing [LevelFilter
].
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)