Respect padding for LevelFilter Display

This mirrors a similar commit fe073054a0
that changed output for Level, it seems sensible if the user wishes to
output the logging filter level to afford the same formatting choices.
This commit is contained in:
John Drinkwater 2019-05-16 11:10:40 +01:00
parent 5213657b81
commit f9eb14c8a1

View File

@ -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])
}
}