/// Initialize the global logger to use KernelLogger.
///
/// Also registers a panic hook that prints the panic payload to the logger before running the
/// default panic hook.
///
/// Returns an error if this or something else already called [log::set_logger()].
Initialize the global logger to use KernelLogger.
Also registers a panic hook that prints the panic payload to the logger before running the
default panic hook.

Returns an error if this or something else already called [log::set_logger()].
Initialize the global logger to use KernelLogger . Also registers a panic hook that prints the panic payload to the logger before running the default panic hook . Returns an error if this or something else already called [ log :: set_logger () ] .
pub fn init() -> Result<(), Error> {
        log::set_logger(&*LOGGER).context("Failed to set KernelLogger as global logger")?;
        log::set_max_level(MAX_LOG_LEVEL.to_level_filter());
        Self::install_panic_hook();
        Ok(())
    }
pub fn init ( ) -> Result < ( ) , Error > { log :: set_logger ( & * LOGGER ) . context ( " " ) ? ; log :: set_max_level ( MAX_LOG_LEVEL . to_level_filter ( ) ) ; Self :: install_panic_hook ( ) ; Ok ( ( ) ) }
Initialize the global logger to use KernelLogger.
Initialize the global logger to use KernelLogger .