pub struct LoggingConfig {
pub level: LogLevel,
pub with_timestamps: bool,
pub with_thread_ids: bool,
pub with_source_location: bool,
pub with_span_events: bool,
pub json_format: bool,
}Expand description
Logging configuration for RONN runtime.
Fields§
§level: LogLevelMinimum log level to display
with_timestamps: boolWhether to include timestamps
with_thread_ids: boolWhether to include thread IDs
with_source_location: boolWhether to include source code locations
with_span_events: boolWhether to log span events (enter/exit)
json_format: boolWhether to output in JSON format
Implementations§
Source§impl LoggingConfig
impl LoggingConfig
Sourcepub fn with_level(self, level: LogLevel) -> Self
pub fn with_level(self, level: LogLevel) -> Self
Set the minimum log level.
Sourcepub fn with_timestamps(self, enable: bool) -> Self
pub fn with_timestamps(self, enable: bool) -> Self
Enable or disable timestamps.
Sourcepub fn with_thread_ids(self, enable: bool) -> Self
pub fn with_thread_ids(self, enable: bool) -> Self
Enable or disable thread IDs.
Sourcepub fn with_source_location(self, enable: bool) -> Self
pub fn with_source_location(self, enable: bool) -> Self
Enable or disable source code locations.
Sourcepub fn with_span_events(self, enable: bool) -> Self
pub fn with_span_events(self, enable: bool) -> Self
Enable or disable span event logging.
Sourcepub fn with_json_format(self, enable: bool) -> Self
pub fn with_json_format(self, enable: bool) -> Self
Enable or disable JSON output format.
Sourcepub fn development() -> Self
pub fn development() -> Self
Create a development-friendly configuration (verbose).
Sourcepub fn production() -> Self
pub fn production() -> Self
Create a production-friendly configuration (minimal).
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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more