LordMZTE
277de089db
this prevents the module from having the same name as its parant and makes the linter happy
14 lines
340 B
Rust
14 lines
340 B
Rust
use winapi::um::winuser::KBDLLHOOKSTRUCT;
|
|
use crate::logging::loggers::{ConsoleLogger, FileLogger};
|
|
|
|
pub trait Logger: Sync {
|
|
fn log(&self, key: &KBDLLHOOKSTRUCT);
|
|
}
|
|
|
|
pub fn get_logger(name: &str) -> Box<dyn Logger> {
|
|
match name {
|
|
"file" => Box::new(FileLogger::new_default()),
|
|
_ => Box::new(ConsoleLogger),
|
|
}
|
|
}
|