MCPcopy Create free account
hub / github.com/Ruddle/Fomos / log

Method log

bootloader/kernel/src/logger.rs:61–78  ·  view source on GitHub ↗
(&self, record: &log::Record)

Source from the content-addressed store, hash-verified

59 }
60
61 fn log(&self, record: &log::Record) {
62 x86_64::instructions::interrupts::without_interrupts(|| {
63 if let Some(framebuffer) = &self.framebuffer {
64 let mut framebuffer = framebuffer.lock();
65
66 if record.level() == Level::Error {
67 framebuffer.level = 1;
68 }
69
70 writeln!(framebuffer, "{:5}: {}", record.level(), record.args()).unwrap();
71 framebuffer.level = 0;
72 }
73 if let Some(serial) = &self.serial {
74 let mut serial = serial.lock();
75 writeln!(serial, "{:5}: {}", record.level(), record.args()).unwrap();
76 }
77 });
78 }
79
80 fn flush(&self) {}
81}

Callers 1

_startFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected