Add a way to customize how logging is done.
Each architecture may have a different method to enable logging. Now that can be customized with a function passed to the init_logger function. Also, provide a minimal x86_64 implementation. This is the first commit where you can see logging coming from the log crate. Signed-off-by: Wren Turkal <wt@penguintechs.org>
This commit is contained in:
@@ -84,7 +84,7 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
|
||||
KERNEL_SIZE.store(kernel_size, Ordering::SeqCst);
|
||||
|
||||
// Initialize logger
|
||||
log::init_logger();
|
||||
log::init_logger(|r| println!("{}:{} -- {}", r.target(), r.level(), r.args()));
|
||||
|
||||
info!("Redox OS starting...");
|
||||
println!("Kernel: {:X}:{:X}", kernel_base, kernel_base + kernel_size);
|
||||
|
||||
Reference in New Issue
Block a user