pub struct ColorTheme {
pub trace: Style,
pub debug: Style,
pub info: Style,
pub warn: Style,
pub error: Style,
pub span_name: Style,
pub field_name: Style,
pub field_value: Style,
pub target: Style,
pub thread_id: Style,
}Available on crate feature
colors only.Expand description
Per-element ANSI styles applied to formatted output.
Construct via ColorTheme::default (matches the 0.1 palette) or
ColorTheme::monochrome (no styling), then override individual
fields as needed.
use tracing_systemd::ColorTheme;
use nu_ansi_term::{Color, Style};
let theme = ColorTheme {
info: Style::new().fg(Color::Cyan).bold(),
..ColorTheme::default()
};Fields§
§trace: Style§debug: Style§info: Style§warn: Style§error: Style§span_name: Style§field_name: Style§field_value: Style§target: Style§thread_id: StyleImplementations§
Source§impl ColorTheme
impl ColorTheme
Sourcepub fn monochrome() -> Self
pub fn monochrome() -> Self
All-empty theme. Useful for users who want structure without ANSI
(e.g. when piping to a log file but still wanting the runtime
option of ColorMode::Always).
Trait Implementations§
Source§impl Clone for ColorTheme
impl Clone for ColorTheme
Source§fn clone(&self) -> ColorTheme
fn clone(&self) -> ColorTheme
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorTheme
impl Debug for ColorTheme
Source§impl Default for ColorTheme
impl Default for ColorTheme
impl Copy for ColorTheme
Auto Trait Implementations§
impl Freeze for ColorTheme
impl RefUnwindSafe for ColorTheme
impl Send for ColorTheme
impl Sync for ColorTheme
impl Unpin for ColorTheme
impl UnsafeUnpin for ColorTheme
impl UnwindSafe for ColorTheme
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