(s: &str)
| 15 | |
| 16 | impl LogLevel { |
| 17 | fn from_str(s: &str) -> Self { |
| 18 | match s.to_uppercase().as_str() { |
| 19 | "DEBUG" => LogLevel::Debug, |
| 20 | "INFO" => LogLevel::Info, |
| 21 | "WARN" => LogLevel::Warn, |
| 22 | "ERROR" => LogLevel::Error, |
| 23 | _ => LogLevel::Info, |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | impl std::fmt::Display for LogLevel { |