File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 99//!
1010//! The format used to print log records can be customised using the [`Builder::format`]
1111//! method.
12- //! Custom formats can apply different color and weight to printed values using
13- //! [`Style`] builders.
12+ //!
13+ //! Terminal styling is done through ANSI escape codes and will be adapted to the capabilities of
14+ //! the target stream.
15+ //! For example, you could use one of:
16+ //! - [anstyle](https://docs.rs/anstyle) is a minimal, runtime string styling API and is re-exported as [`style`]
17+ //! - [owo-colors](https://docs.rs/owo-colors) is a feature rich runtime string styling API
18+ //! - [color-print](https://docs.rs/color-print) for feature-rich compile-time styling API
19+ //! See also [`Formatter::default_level_style`]
1420//!
1521//! ```
1622//! use std::io::Write;
@@ -78,7 +84,7 @@ impl Default for TimestampPrecision {
7884/// A formatter to write logs into.
7985///
8086/// `Formatter` implements the standard [`Write`] trait for writing log records.
81- /// It also supports terminal colors, through the [`style`] method .
87+ /// It also supports terminal styling using ANSI escape codes .
8288///
8389/// # Examples
8490///
@@ -95,7 +101,6 @@ impl Default for TimestampPrecision {
95101///
96102/// [`Write`]: std::io::Write
97103/// [`writeln`]: std::writeln
98- /// [`style`]: #method.style
99104pub struct Formatter {
100105 buf : Rc < RefCell < Buffer > > ,
101106 write_style : WriteStyle ,
You can’t perform that action at this time.
0 commit comments