(&self, message: &str, extra: Option<HashMap<String, String>>)
| 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) { |
nothing calls this directly
no test coverage detected