Struct slog_term::TermDecorator
[−]
[src]
pub struct TermDecorator { /* fields omitted */ }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.
Methods
impl TermDecorator[src]
fn new() -> TermDecoratorBuilder
Start building TermDecorator
fn level_to_color(level: Level) -> u16
Level color
Standard level to Unix color conversion used by TermDecorator
Trait Implementations
impl Decorator for TermDecorator[src]
fn with_record<F>(
&self,
record: &Record,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut RecordDecorator) -> Result<()>,
&self,
record: &Record,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut RecordDecorator) -> Result<()>,
Get a RecordDecorator for a given record Read more