diff --git a/general/src/protocol/types.rs b/general/src/protocol/types.rs index 697bab87b2c..efe61051616 100644 --- a/general/src/protocol/types.rs +++ b/general/src/protocol/types.rs @@ -515,7 +515,7 @@ impl FromStr for Level { "info" | "log" => Level::Info, "warning" => Level::Warning, "error" => Level::Error, - "fatal" => Level::Fatal, + "fatal" | "critical" => Level::Fatal, _ => return Err(ParseLevelError), }) } @@ -816,6 +816,13 @@ fn test_level() { Level::Warning, Annotated::::from_json("30").unwrap().0.unwrap() ); + assert_eq_dbg!( + Level::Fatal, + Annotated::::from_json("\"critical\"") + .unwrap() + .0 + .unwrap() + ); } #[test]