File tree 1 file changed +9
-4
lines changed 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 9
9
//!
10
10
//! The format used to print log records can be customised using the [`Builder::format`]
11
11
//! 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`]
14
20
//!
15
21
//! ```
16
22
//! use std::io::Write;
@@ -78,7 +84,7 @@ impl Default for TimestampPrecision {
78
84
/// A formatter to write logs into.
79
85
///
80
86
/// `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 .
82
88
///
83
89
/// # Examples
84
90
///
@@ -95,7 +101,6 @@ impl Default for TimestampPrecision {
95
101
///
96
102
/// [`Write`]: std::io::Write
97
103
/// [`writeln`]: std::writeln
98
- /// [`style`]: #method.style
99
104
pub struct Formatter {
100
105
buf : Rc < RefCell < Buffer > > ,
101
106
write_style : WriteStyle ,
You can’t perform that action at this time.
0 commit comments