diff --git a/Cargo.toml b/Cargo.toml index d63f494..a459745 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "1.8.1" +version = "1.8.2" edition = "2021" authors = ["baoyachi "] description = "A simple log. It's really simple use" diff --git a/src/lib.rs b/src/lib.rs index 407d921..6eec192 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -656,18 +656,18 @@ fn encoder(time_format: Option<&String>, color: bool) -> PatternEncoder { }; let color_level = match color { - true => "h({l})", - false => "l", + true => "{h({l:5})}", + false => "{l:5}", }; - let mut pattern = format!("{{d({})}} [{{{}}}] ", time_format, color_level); + let mut pattern = format!("{{d({})}} [{}] ", time_format, color_level); #[cfg(feature = "target")] { - pattern += "[{t}] <{f}:{L}>:{m}{n}"; + pattern += "[{t:7}] <{M}:{L}>:{m}{n}"; } #[cfg(not(feature = "target"))] { - pattern += "<{f}:{L}>:{m}{n}"; + pattern += "<{M}:{L}>:{m}{n}"; } PatternEncoder::new(pattern.as_str())