1
0
Fork 0
forked from koniifer/ableos

minor work done on logging

This commit is contained in:
Able 2021-12-24 03:40:11 -06:00
parent c8455f9352
commit 12db5307b3
2 changed files with 8 additions and 8 deletions

View file

@ -51,7 +51,7 @@ pub fn kernel_main() -> ! {
// crate::wasm::evaluate(); // crate::wasm::evaluate();
println!("{} v{}", RELEASE_TYPE, KERNEL_VERSION); 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; use crate::experiments::mail::MailBoxes;

View file

@ -1,8 +1,8 @@
pub trait Log { pub trait Log {
fn debug(val: &str); fn debug(val: &str);
fn error(); fn error(val: &str);
fn info(val: &str); fn info(val: &str);
fn trace(); fn trace(val: &str);
} }
use crate::serial_print; use crate::serial_print;
@ -12,13 +12,13 @@ impl Log for ANSISerialLogger {
fn debug(val: &str) { fn debug(val: &str) {
serial_print!("[{}Debug{}] {}\n", Fg::Blue, Reset, val); serial_print!("[{}Debug{}] {}\n", Fg::Blue, Reset, val);
} }
fn error() { fn error(val: &str) {
todo!(); serial_print!("[{}Error{}] {}\n", Fg::Red, Reset, val);
} }
fn info(val: &str) { fn info(val: &str) {
serial_print!("[{}Info{}] {}\n", Fg::Blue, Reset, val); serial_print!("[{}Info{}] {}\n", Fg::LightWhite, Reset, val);
} }
fn trace() { fn trace(val: &str) {
todo!(); serial_print!("[{}Trace{}] {}\n", Fg::Yellow, Reset, val);
} }
} }