diff options
author | nathan dawit <nathandawit555@gmail.com> | 2023-06-25 11:36:52 +0300 |
---|---|---|
committer | Wez Furlong <wez@wezfurlong.org> | 2023-07-10 08:11:13 -0700 |
commit | 5523e9af89d11f3444bd588ae9a1e5d20340e63b (patch) | |
tree | e6c57e2bd8143b5c75544bc1bcbec0861e6f22b7 | |
parent | 4480c4eda223b98899b0fbd926bc34f7bd0e1a18 (diff) |
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
-rw-r--r-- | Cargo.lock | 1 | ||||
-rw-r--r-- | src/main.rs | 2 | ||||
-rw-r--r-- | src/remapper.rs | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -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 |