From 12db5307b37027925dc58b569f908e4c84c1ed2b Mon Sep 17 00:00:00 2001 From: Able Date: Fri, 24 Dec 2021 03:40:11 -0600 Subject: [PATCH] minor work done on logging --- ableos/src/kmain.rs | 2 +- ableos/src/log.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ableos/src/kmain.rs b/ableos/src/kmain.rs index e893723..8ec72d6 100644 --- a/ableos/src/kmain.rs +++ b/ableos/src/kmain.rs @@ -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; diff --git a/ableos/src/log.rs b/ableos/src/log.rs index 3ef3863..3829f04 100644 --- a/ableos/src/log.rs +++ b/ableos/src/log.rs @@ -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); } }