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

Method new

crates/opencode-util/src/logging.rs:66–76  ·  view source on GitHub ↗
(tags: HashMap<String, String>, writer: Arc<Mutex<Box<dyn Write + Send>>>)

Source from the content-addressed store, hash-verified

64
65impl Logger {
66 fn new(tags: HashMap<String, String>, writer: Arc<Mutex<Box<dyn Write + Send>>>) -> Self {
67 let level = tags
68 .get("level")
69 .map(|l| LogLevel::from_str(l))
70 .unwrap_or(LogLevel::Info);
71 Self {
72 tags,
73 level,
74 writer,
75 }
76 }
77
78 fn should_log(&self, level: LogLevel) -> bool {
79 let priority = match level {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected