|
140 | 140 | //! [log_kv]: https://docs.rs/log/latest/log/kv/index.html |
141 | 141 |
|
142 | 142 | use chrono::{Local, Utc}; |
143 | | -use derive_more::Debug; |
144 | 143 | use log::{Level, Record}; |
145 | | -use std::{default::Default, io, mem, process, thread}; |
| 144 | +use std::{default::Default, fmt, io, mem, process, thread}; |
146 | 145 | use unicode_segmentation::{GraphemeCursor, UnicodeSegmentation}; |
147 | 146 |
|
148 | 147 | use crate::encode::{ |
@@ -703,12 +702,18 @@ impl FormattedChunk { |
703 | 702 | } |
704 | 703 |
|
705 | 704 | /// An `Encode`r configured via a format string. |
706 | | -#[derive(Clone, Eq, Debug, PartialEq, Hash)] |
| 705 | +#[derive(Clone, Eq, PartialEq, Hash)] |
707 | 706 | pub struct PatternEncoder { |
708 | | - #[debug(skip)] |
709 | 707 | chunks: Vec<Chunk>, |
710 | 708 | pattern: String, |
711 | 709 | } |
| 710 | +impl fmt::Debug for PatternEncoder { |
| 711 | + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 712 | + f.debug_struct("PatternEncoder") |
| 713 | + .field("pattern", &self.pattern) |
| 714 | + .finish_non_exhaustive() |
| 715 | + } |
| 716 | +} |
712 | 717 |
|
713 | 718 | /// Returns a `PatternEncoder` using the default pattern of `{d} {l} {t} - {m}{n}`. |
714 | 719 | impl Default for PatternEncoder { |
|
0 commit comments