Struct sc_tracing::logging::EventFormat
source · [−]pub struct EventFormat<T = SystemTime> {
pub timer: T,
pub display_target: bool,
pub display_level: bool,
pub display_thread_name: bool,
pub enable_color: bool,
}
Expand description
A pre-configured event formatter.
Fields
timer: T
Use the given timer for log message timestamps.
display_target: bool
Sets whether or not an event’s target is displayed.
display_level: bool
Sets whether or not an event’s level is displayed.
display_thread_name: bool
Sets whether or not the name of the current thread is displayed when formatting events.
enable_color: bool
Enable ANSI terminal colors for formatted output.
Trait Implementations
sourceimpl<S, N, T> FormatEvent<S, N> for EventFormat<T> where
S: Subscriber + for<'a> LookupSpan<'a>,
N: for<'a> FormatFields<'a> + 'static,
T: FormatTime,
impl<S, N, T> FormatEvent<S, N> for EventFormat<T> where
S: Subscriber + for<'a> LookupSpan<'a>,
N: for<'a> FormatFields<'a> + 'static,
T: FormatTime,
sourcefn format_event(
&self,
ctx: &FmtContext<'_, S, N>,
writer: &mut dyn Write,
event: &Event<'_>
) -> Result
fn format_event(
&self,
ctx: &FmtContext<'_, S, N>,
writer: &mut dyn Write,
event: &Event<'_>
) -> Result
Write a log message for Event
in Context
to the given Write
.
Auto Trait Implementations
impl<T> RefUnwindSafe for EventFormat<T> where
T: RefUnwindSafe,
impl<T> Send for EventFormat<T> where
T: Send,
impl<T> Sync for EventFormat<T> where
T: Sync,
impl<T> Unpin for EventFormat<T> where
T: Unpin,
impl<T> UnwindSafe for EventFormat<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more