Struct slog_term::TermDecorator [−][src]
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
impl TermDecorator
[src]
pub fn new() -> TermDecoratorBuilder
[src]
Start building TermDecorator
pub fn level_to_color(level: Level) -> u16
[src]
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 dyn RecordDecorator) -> Result<()>,
[src]
&self,
record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> 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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,