summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan dawit <nathandawit555@gmail.com>2023-06-25 11:36:52 +0300
committerWez Furlong <wez@wezfurlong.org>2023-07-10 08:11:13 -0700
commit5523e9af89d11f3444bd588ae9a1e5d20340e63b (patch)
treee6c57e2bd8143b5c75544bc1bcbec0861e6f22b7
parent4480c4eda223b98899b0fbd926bc34f7bd0e1a18 (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.lock1
-rw-r--r--src/main.rs2
-rw-r--r--src/remapper.rs2
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