[−][src]Struct holochain_logging::color::ColoredLevelConfig
Fields
error: Color
The color to color logs with the Error
level.
warn: Color
The color to color logs with the Warn
level.
info: Color
The color to color logs with the Info
level.
debug: Color
The color to color logs with the Debug
level.
trace: Color
The color to color logs with the Trace
level.
Methods
impl ColoredLevelConfig
[src]
pub fn new() -> Self
[src]
Creates a new ColoredLevelConfig with the default colors.
This matches the behavior of ColoredLevelConfig::default
.
pub fn color(self, level: Level) -> WithFgColor<Level>
[src]
Colors the given log level with the color in this configuration corresponding to it's level.
The structure returned is opaque, but will print the Level surrounded
by ANSI color codes when displayed. This will work correctly for
UNIX terminals, but due to a lack of support from the colored
crate, this will not function in Windows.
pub fn get_color(self, level: Level) -> Color
[src]
Retrieves the color that a log level should be colored as.
Trait Implementations
impl Clone for ColoredLevelConfig
[src]
fn clone(&self) -> ColoredLevelConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ColoredLevelConfig
[src]
impl Default for ColoredLevelConfig
[src]
fn default() -> Self
[src]
Retrieves the default configuration. This has:
Error
asColor::Red
Warn
asColor::Yellow
Info
asColor::White
Debug
asColor::White
Trace
asColor::White
Auto Trait Implementations
impl Send for ColoredLevelConfig
impl Sync for ColoredLevelConfig
impl Unpin for ColoredLevelConfig
impl UnwindSafe for ColoredLevelConfig
impl RefUnwindSafe for ColoredLevelConfig
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,