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

Method warn

crates/opencode-util/src/logging.rs:144–152  ·  view source on GitHub ↗
(&self, message: &str, extra: Option<HashMap<String, String>>)

Source from the content-addressed store, hash-verified

142 }
143
144 pub fn warn(&self, message: &str, extra: Option<HashMap<String, String>>) {
145 if self.should_log(LogLevel::Warn) {
146 let msg = self.build_message(LogLevel::Warn, message, extra.as_ref());
147 if let Ok(mut writer) = self.writer.lock() {
148 let _ = writer.write_all(msg.as_bytes());
149 let _ = writer.flush();
150 }
151 }
152 }
153
154 pub fn error(&self, message: &str, extra: Option<HashMap<String, String>>) {
155 if self.should_log(LogLevel::Error) {

Callers

nothing calls this directly

Calls 2

should_logMethod · 0.80
build_messageMethod · 0.80

Tested by

no test coverage detected