From 5523e9af89d11f3444bd588ae9a1e5d20340e63b Mon Sep 17 00:00:00 2001 From: nathan dawit Date: Sun, 25 Jun 2023 11:36:52 +0300 Subject: feat: make warnings/logs more informative it's confusing to launch the program and see an error message that's not actually an error fixes #25 --- Cargo.lock | 1 + src/main.rs | 2 +- src/remapper.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0971a9c..f9e7e9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,6 +215,7 @@ version = "0.1.0" dependencies = [ "anyhow", "evdev-rs", + "libc", "log", "pretty_env_logger", "serde", diff --git a/src/main.rs b/src/main.rs index 0635a30..20d6dc6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,7 +72,7 @@ fn main() -> Result<()> { config_file.display() ))?; - log::error!("Short delay: release any keys now!"); + log::warn!("Short delay: release any keys now!"); std::thread::sleep(Duration::new(2, 0)); let device_info = deviceinfo::DeviceInfo::with_name( diff --git a/src/remapper.rs b/src/remapper.rs index 0e90697..3db493c 100644 --- a/src/remapper.rs +++ b/src/remapper.rs @@ -118,7 +118,7 @@ impl InputMapper { } pub fn run_mapper(&mut self) -> Result<()> { - log::error!("Going into read loop"); + log::info!("Going into read loop"); loop { let (status, event) = self .input -- cgit v1.2.3