Trait axlog::LogIf

source ·
pub trait LogIf {
    // Required methods
    fn console_write_str(s: &str);
    fn current_time() -> Duration;
    fn current_cpu_id() -> Option<usize>;
    fn current_task_id() -> Option<u64>;
}
Expand description

Extern interfaces that must be implemented in other crates.

Required Methods§

source

fn console_write_str(s: &str)

Writes a string to the console.

source

fn current_time() -> Duration

Gets current clock time.

source

fn current_cpu_id() -> Option<usize>

Gets current CPU ID.

Returns None if you don’t want to show the CPU ID in the log.

source

fn current_task_id() -> Option<u64>

Gets current task ID.

Returns None if you don’t want to show the task ID in the log.

Object Safety§

This trait is not object safe.

Implementors§