MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / from_str

Method from_str

crates/opencode-util/src/logging.rs:17–25  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

15
16impl 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
28impl std::fmt::Display for LogLevel {

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected