pub fn from_string(level: String) -> std::result::Result<Self, LoggerConfigError> {
        match level.to_ascii_lowercase().as_str() {
            "error" => Ok(LoggerLevel::Error),
            "warning" => Ok(LoggerLevel::Warning),
            "info" => Ok(LoggerLevel::Info),
            "debug" => Ok(LoggerLevel::Debug),
            _ => Err(LoggerConfigError::InitializationFailure(level)),
        }
    }
/// Converts from a logger level value of type String to the corresponding LoggerLevel variant
/// or returns an error if the parsing failed.
Converts from a logger level value of type String to the corresponding LoggerLevel variant
or returns an error if the parsing failed.
Converts from a logger level value of type String to the corresponding LoggerLevel variant or returns an error if the parsing failed .
pub fn from_string(level: String) -> std::result::Result<Self, LoggerConfigError> {
        match level.to_ascii_lowercase().as_str() {
            "error" => Ok(LoggerLevel::Error),
            "warning" => Ok(LoggerLevel::Warning),
            "info" => Ok(LoggerLevel::Info),
            "debug" => Ok(LoggerLevel::Debug),
            _ => Err(LoggerConfigError::InitializationFailure(level)),
        }
    }
pub fn from_string ( level : String ) -> std :: result :: Result < Self , LoggerConfigError > { match level . to_ascii_lowercase ( ) . as_str ( ) { " " => Ok ( LoggerLevel :: Error ) , " " => Ok ( LoggerLevel :: Warning ) , " " => Ok ( LoggerLevel :: Info ) , " " => Ok ( LoggerLevel :: Debug ) , _ => Err ( LoggerConfigError :: InitializationFailure ( level ) ) , } }
Converts from a logger level value of type String to the corresponding LoggerLevel variant
or returns an error if the parsing failed.
Converts from a logger level value of type String to the corresponding LoggerLevel variant or returns an error if the parsing failed .
level
String
level
String