pub struct RlgBuilder { /* private fields */ }Expand description
Builder for customizing RLG initialization.
Implementations§
Source§impl RlgBuilder
impl RlgBuilder
Sourcepub const fn level(self, level: LogLevel) -> Self
pub const fn level(self, level: LogLevel) -> Self
Set the minimum severity level. Events below this are dropped.
Sourcepub const fn format(self, format: LogFormat) -> Self
pub const fn format(self, format: LogFormat) -> Self
Set the default output format. Overrides auto-detection.
Sourcepub const fn without_log(self) -> Self
pub const fn without_log(self) -> Self
Skip installing the log crate facade bridge.
Sourcepub const fn without_tracing(self) -> Self
pub const fn without_tracing(self) -> Self
Skip installing the tracing global subscriber.
Sourcepub fn init(self) -> Result<FlushGuard, InitError>
pub fn init(self) -> Result<FlushGuard, InitError>
Finalize and install RLG as the global logger and subscriber.
Applies RUST_LOG overrides and auto-detects the format
(TTY → Logfmt, pipe → JSON) when none was explicitly set.
§Errors
Returns InitError if a global logger/subscriber already exists
or if init() was already called.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RlgBuilder
impl RefUnwindSafe for RlgBuilder
impl Send for RlgBuilder
impl Sync for RlgBuilder
impl Unpin for RlgBuilder
impl UnsafeUnpin for RlgBuilder
impl UnwindSafe for RlgBuilder
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