pub struct LogConfigBuilder { /* private fields */ }Expand description
Builder for LogConfig.
Implementations§
Source§impl LogConfigBuilder
impl LogConfigBuilder
Sourcepub fn level(self, level: LogLevel) -> LogConfigBuilder
pub fn level(self, level: LogLevel) -> LogConfigBuilder
Set the log level.
Sourcepub fn format(self, format: LogFormat) -> LogConfigBuilder
pub fn format(self, format: LogFormat) -> LogConfigBuilder
Set the output format.
Sourcepub fn target(self, target: LogTarget) -> LogConfigBuilder
pub fn target(self, target: LogTarget) -> LogConfigBuilder
Set the output target.
Sourcepub fn include_location(self, include: bool) -> LogConfigBuilder
pub fn include_location(self, include: bool) -> LogConfigBuilder
Set whether to include file/line location.
Sourcepub fn include_target(self, include: bool) -> LogConfigBuilder
pub fn include_target(self, include: bool) -> LogConfigBuilder
Set whether to include module target.
Sourcepub fn include_span_events(self, include: bool) -> LogConfigBuilder
pub fn include_span_events(self, include: bool) -> LogConfigBuilder
Set whether to include span events.
Sourcepub fn include_thread_ids(self, include: bool) -> LogConfigBuilder
pub fn include_thread_ids(self, include: bool) -> LogConfigBuilder
Set whether to include thread IDs.
Sourcepub fn include_thread_names(self, include: bool) -> LogConfigBuilder
pub fn include_thread_names(self, include: bool) -> LogConfigBuilder
Set whether to include thread names.
Sourcepub fn filter(self, filter: impl Into<String>) -> LogConfigBuilder
pub fn filter(self, filter: impl Into<String>) -> LogConfigBuilder
Set custom filter directives.
Sourcepub fn ansi_colors(self, enable: bool) -> LogConfigBuilder
pub fn ansi_colors(self, enable: bool) -> LogConfigBuilder
Set whether to enable ANSI colors.
Sourcepub fn dynamic_level(self, enable: bool) -> LogConfigBuilder
pub fn dynamic_level(self, enable: bool) -> LogConfigBuilder
Set whether to enable dynamic log level changes.
Sourcepub fn module_level(
self,
module: impl Into<String>,
level: LogLevel,
) -> LogConfigBuilder
pub fn module_level( self, module: impl Into<String>, level: LogLevel, ) -> LogConfigBuilder
Add a per-module log level.
Trait Implementations§
Source§impl Debug for LogConfigBuilder
impl Debug for LogConfigBuilder
Source§impl Default for LogConfigBuilder
impl Default for LogConfigBuilder
Source§fn default() -> LogConfigBuilder
fn default() -> LogConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LogConfigBuilder
impl RefUnwindSafe for LogConfigBuilder
impl Send for LogConfigBuilder
impl Sync for LogConfigBuilder
impl Unpin for LogConfigBuilder
impl UnsafeUnpin for LogConfigBuilder
impl UnwindSafe for LogConfigBuilder
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> 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