Struct slog_term::TermDecorator
source · pub struct TermDecorator { /* private fields */ }
Expand description
Decorator
implemented using term
crate
This decorator will add nice formatting to the logs it’s outputting. It’s
based on term
crate.
It does not deal with serialization so is !Sync
. Run in a separate thread
with slog_async::Async
.
Implementations§
source§impl TermDecorator
impl TermDecorator
sourcepub fn new() -> TermDecoratorBuilder
pub fn new() -> TermDecoratorBuilder
Start building TermDecorator
sourcepub fn level_to_color(level: Level) -> u16
pub fn level_to_color(level: Level) -> u16
Level
color
Standard level to Unix color conversion used by TermDecorator
Trait Implementations§
source§impl Decorator for TermDecorator
impl Decorator for TermDecorator
source§fn with_record<F>(
&self,
record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()>
fn with_record<F>( &self, record: &Record<'_>, _logger_values: &OwnedKVList, f: F ) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for TermDecorator
impl Send for TermDecorator
impl !Sync for TermDecorator
impl Unpin for TermDecorator
impl !UnwindSafe for TermDecorator
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