pub struct DefaultCologStyle;
Expand description
Default colog style. Can manually be enabled like so:
use log::info;
use colog::format::{CologStyle, DefaultCologStyle};
let mut builder = env_logger::Builder::new();
builder.format(colog::formatter(DefaultCologStyle));
/* ... */
builder.init();
info!("logging ready");
Trait Implementations§
Source§impl CologStyle for DefaultCologStyle
impl CologStyle for DefaultCologStyle
Source§fn level_color(&self, level: &Level, msg: &str) -> String
fn level_color(&self, level: &Level, msg: &str) -> String
Format a message for a particular log level Read more
Source§fn level_token(&self, level: &Level) -> &str
fn level_token(&self, level: &Level) -> &str
Provide a “token” for a particular log level Read more
Source§fn prefix_token(&self, level: &Level) -> String
fn prefix_token(&self, level: &Level) -> String
Construct the line prefix for a message of the given log level. Read more
Source§fn line_separator(&self) -> String
fn line_separator(&self) -> String
Returns the default line separator string, used when formatting
multi-line log messages. Read more
Auto Trait Implementations§
impl Freeze for DefaultCologStyle
impl RefUnwindSafe for DefaultCologStyle
impl Send for DefaultCologStyle
impl Sync for DefaultCologStyle
impl Unpin for DefaultCologStyle
impl UnwindSafe for DefaultCologStyle
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