Struct serif::EventFormatter
source · pub struct EventFormatter { /* private fields */ }
Expand description
Serif’s tracing event formatter.
§Event Format
Events are rendered similarly to tracing_subscriber::fmt::format::Full
, but with everything
besides the main log message in dimmed ANSI text colors to increase readability of the main log
message.
Implementations§
source§impl EventFormatter
impl EventFormatter
sourcepub fn with_timestamp(self, time_format: TimeFormat) -> Self
pub fn with_timestamp(self, time_format: TimeFormat) -> Self
Set the timestamp format for this event formatter.
sourcepub fn with_target(self, display_target: bool) -> Self
pub fn with_target(self, display_target: bool) -> Self
Set whether or not an event’s target is displayed.
sourcepub fn with_scope(self, display_scope: bool) -> Self
pub fn with_scope(self, display_scope: bool) -> Self
Set whether or not an event’s span scope is displayed.
Trait Implementations§
source§impl Clone for EventFormatter
impl Clone for EventFormatter
source§fn clone(&self) -> EventFormatter
fn clone(&self) -> EventFormatter
Returns a copy 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 EventFormatter
impl Debug for EventFormatter
source§impl Default for EventFormatter
impl Default for EventFormatter
source§impl<S, N> FormatEvent<S, N> for EventFormatter
impl<S, N> FormatEvent<S, N> for EventFormatter
source§fn format_event(
&self,
ctx: &FmtContext<'_, S, N>,
writer: Writer<'_>,
event: &Event<'_>,
) -> Result
fn format_event( &self, ctx: &FmtContext<'_, S, N>, writer: Writer<'_>, event: &Event<'_>, ) -> Result
Auto Trait Implementations§
impl Freeze for EventFormatter
impl RefUnwindSafe for EventFormatter
impl Send for EventFormatter
impl Sync for EventFormatter
impl Unpin for EventFormatter
impl UnwindSafe for EventFormatter
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