pub struct LogStyle {
pub timestamp: bool,
pub timestamp_format: String,
pub show_level: bool,
pub short_level: bool,
pub show_icons: bool,
pub timestamp_color: Color,
pub key_color: Color,
pub value_color: Color,
pub message_color: Color,
pub separator: String,
pub kv_separator: String,
}Expand description
Styling options for log output.
Fields§
§timestamp: boolShow timestamps.
timestamp_format: StringTimestamp format.
show_level: boolShow log level.
short_level: boolUse short level names.
show_icons: boolShow icons.
timestamp_color: ColorTimestamp color.
key_color: ColorKey color.
value_color: ColorValue color.
message_color: ColorMessage color.
separator: StringSeparator between key-value pairs.
kv_separator: StringKey-value separator.
Implementations§
Source§impl LogStyle
impl LogStyle
Sourcepub fn with_timestamp(self) -> Self
pub fn with_timestamp(self) -> Self
Enable timestamps.
Sourcepub fn timestamp_format(self, format: impl Into<String>) -> Self
pub fn timestamp_format(self, format: impl Into<String>) -> Self
Set timestamp format.
Sourcepub fn short_level(self) -> Self
pub fn short_level(self) -> Self
Use short level names.
Sourcepub fn with_icons(self) -> Self
pub fn with_icons(self) -> Self
Show icons.
Sourcepub fn hide_level(self) -> Self
pub fn hide_level(self) -> Self
Hide level.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogStyle
impl RefUnwindSafe for LogStyle
impl Send for LogStyle
impl Sync for LogStyle
impl Unpin for LogStyle
impl UnwindSafe for LogStyle
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)