pub enum LogFormat {
Plain,
Json,
}Available on crate feature
log only.Expand description
Configures whether logs should be emitted in plaintext (the default) or as JSON-encoded messages
Variants
Plain
The default plaintext format
Json
The JSON-encoded format
Implementations
sourceimpl LogFormat
impl LogFormat
sourcepub fn try_init(self, filter: LogFilter) -> Result<(), LogInitError>
pub fn try_init(self, filter: LogFilter) -> Result<(), LogInitError>
Attempts to configure the global default tracing subscriber in the current scope, returning an error if one is already set
This method returns an error if a global default subscriber has already been set, or if a
log logger has already been set.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LogFormat
impl Send for LogFormat
impl Sync for LogFormat
impl Unpin for LogFormat
impl UnwindSafe for LogFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more