#windows-event #logger #windows #service #log-messages #back-end

win-service-logger

A logger backend which writes messages to the Windows Event Viewer

2 releases

0.1.1 Jan 12, 2024
0.1.0 Nov 19, 2021

#14 in #windows-event

MIT license

9KB
90 lines

win-service-logger

A logger which writes log messages to the Windows Event Viewer

Example

extern crate win_service_logger;
#[macro_use] extern crate log;

fn main() {
    win_service_logger::init();
    trace!("Hello from Rust!");

    warn!("This will be a warning in Event Viewer!");
    error!("Bad");
}

lib.rs:

A logger which writes log messages to the Windows Event Viewer

Example

extern crate win_service_logger;
#[macro_use] extern crate log;

fn main() {
    win_service_logger::init();
    trace!("Hello from Rust!");

    warn!("This will be a warning in Event Viewer!");
    error!("Bad");
}

Dependencies

~0.6–0.8MB
~10K SLoC