not-matthias / kernel-log-rs

A minimalistic logger for Windows Kernel Drivers.
https://crates.io/crates/kernel-log
20 stars 2 forks source link

Rust crates.io docs.rs

kernel-log-rs

A minimalistic logger for Windows Kernel Drivers.

Usage

#![no_std]

use kernel_log::KernelLogger;

#[no_mangle]
pub extern "system" fn DriverEntry(_: PDRIVER_OBJECT, _: u64) -> NTSTATUS {
    KernelLogger::init(LevelFilter::Info).expect("Failed to initialize logger");

    log::warn!("This is an example message.")
}