From f9eb14c8a1f76385acc39405b40caf43d8b2fa1e Mon Sep 17 00:00:00 2001 From: John Drinkwater Date: Thu, 16 May 2019 11:10:40 +0100 Subject: [PATCH] Respect padding for LevelFilter Display This mirrors a similar commit fe073054a0999d1bb238cb0293757741e95b3588 that changed output for Level, it seems sensible if the user wishes to output the logging filter level to afford the same formatting choices. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 1b02290..e1e6fdf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -638,7 +638,7 @@ impl FromStr for LevelFilter { impl fmt::Display for LevelFilter { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - write!(fmt, "{}", LOG_LEVEL_NAMES[*self as usize]) + fmt.pad(LOG_LEVEL_NAMES[*self as usize]) } }