minor work done on logging
This commit is contained in:
parent
c8455f9352
commit
12db5307b3
|
@ -51,7 +51,7 @@ pub fn kernel_main() -> ! {
|
|||
// crate::wasm::evaluate();
|
||||
|
||||
println!("{} v{}", RELEASE_TYPE, KERNEL_VERSION);
|
||||
log::ANSISerialLogger::debug(&format!("{} v{}", RELEASE_TYPE, KERNEL_VERSION));
|
||||
log::ANSISerialLogger::info(&format!("{} v{}", RELEASE_TYPE, KERNEL_VERSION));
|
||||
|
||||
{
|
||||
use crate::experiments::mail::MailBoxes;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pub trait Log {
|
||||
fn debug(val: &str);
|
||||
fn error();
|
||||
fn error(val: &str);
|
||||
fn info(val: &str);
|
||||
fn trace();
|
||||
fn trace(val: &str);
|
||||
}
|
||||
|
||||
use crate::serial_print;
|
||||
|
@ -12,13 +12,13 @@ impl Log for ANSISerialLogger {
|
|||
fn debug(val: &str) {
|
||||
serial_print!("[{}Debug{}] {}\n", Fg::Blue, Reset, val);
|
||||
}
|
||||
fn error() {
|
||||
todo!();
|
||||
fn error(val: &str) {
|
||||
serial_print!("[{}Error{}] {}\n", Fg::Red, Reset, val);
|
||||
}
|
||||
fn info(val: &str) {
|
||||
serial_print!("[{}Info{}] {}\n", Fg::Blue, Reset, val);
|
||||
serial_print!("[{}Info{}] {}\n", Fg::LightWhite, Reset, val);
|
||||
}
|
||||
fn trace() {
|
||||
todo!();
|
||||
fn trace(val: &str) {
|
||||
serial_print!("[{}Trace{}] {}\n", Fg::Yellow, Reset, val);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue